Methods

In Bootstrap Switch, every option is also a method.

If the second parameter is omitted, the method return the current value.

You can invoke methods as follows:

$('input[name="my-checkbox"]').bootstrapSwitch('state', true, true);

Additional Methods

Name Description
toggleState Toggle the switch state
toggleAnimate Toggle the animate option
toggleDisabled Toggle the disabled state
toggleReadonly Toggle the readonly state
toggleIndeterminate Toggle the indeterminate state
toggleInverse Toggle the inverse option
destroy Destroy the instance of Bootstrap Switch

Special Behaviours