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);
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 |
state
can receive an optional third parameter skip
. if true, switchChange
event is not executed. The default is false.toggleState
can receive an optional second parameter skip
. if true, switchChange
event is not executed. The default is false.wrapperClass
can accepts a falsy value as second parameter. If so, it resets the class to its default.Licensed under the Apache License, Version 2.0 · Created by Mattia Larentis · Mantained by Emanuele Marchi