Methods

In Bootstrap Switch, every option is also a method.

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

You can invoke methods as follows:

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

Additional Methods

NameDescription
toggleStateToggle the switch state
toggleAnimateToggle the animate option
toggleDisabledToggle the disabled state
toggleReadonlyToggle the readonly state
toggleIndeterminateToggle the indeterminate state
toggleInverseToggle the inverse option
destroyDestroy the instance of Bootstrap Switch

Special Behaviours