jquery-toggles
                                
                                 jquery-toggles copied to clipboard
                                
                                    jquery-toggles copied to clipboard
                            
                            
                            
                        Toggle event is being fired twice
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?
set click: false and still click it --> goes on and off doing nothing. bug!