Events
All the events are namespaced, therefore always append .bootstrapSwitch when you
attach your handlers.
You can register to the emitted events as follows:
$('input[name="my-checkbox"]').on('switchChange.bootstrapSwitch', function(event, state) {
console.log(this); // DOM element
console.log(event); // jQuery event
console.log(state); // true | false
});| Name | Description | Parameters |
|---|---|---|
| init | Triggered on initialization. 'this' refers to the DOM element. | event (jQuery Event object) state (true | false) |
| switchChange | Triggered on switch state change. 'this' refers to the DOM element. | event (jQuery Event object), state (true | false) |
