Bootstrap switch checked event?

Note: The bootstrap docs now use the second example.

For bootstrap-switch 3.0 release candidate the event previously given as an example on the official page was:

$('#switch-change').on('switchChange', function (e, data) {}); 

It doesn’t get fired!

Solution – use this instead :

$('#switch-change').on('switchChange.bootstrapSwitch', function (event, state) {}); 

where state parameter is the value of the checkbox.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)