jquery-toggles icon indicating copy to clipboard operation
jquery-toggles copied to clipboard

Toggle event is being fired twice

Open crephix opened this issue 9 years ago • 1 comments

Hello, I wonder why the toggle event is being fired twice when clicked. This is my code and it outputs the console.log twice each case:

$('.toggle').on('toggle', function(e, active) {
        if(active)
          console.log("Aktiv!" + active);
        else
          console.log("Inaktiv!" + active);
      })

I noticed that if the user completely swipes the toggle element it is only being fired once. I just want to do ONE MySQL query once the state has changed, how would I do so?

crephix avatar Jul 31 '16 14:07 crephix

set click: false and still click it --> goes on and off doing nothing. bug!

terhoraj avatar Sep 07 '16 16:09 terhoraj