0

I've just updated the jQuery bootstrap-switch plugin to the latest version that includes so many interesting and cool features, but I'd a working code that looks like:

var $checkbox = $('input[name="whatever"]');

$checkbox.bootstrapSwitch();

$checkbox.on('change', function() {
  // ... do something cool here
});

And when I toggle the switch a change event was being triggered in the input, cool because the above code works if so, but... with the last update this is not happening!

I know there are an onSwitchChange callback that I can use to identify changes on the input but you know I don't want to refactor 100 lines of code before knowing if I'm missing something.

Cristian Rojas
  • 2,746
  • 7
  • 33
  • 42

1 Answers1

1

This has worked for me. Version 3.0.2

        $elem.on('switchChange.bootstrapSwitch', function (e, data) {
          //Do something
        });
Icepick
  • 159
  • 1
  • 10