bootstrap switch set value code example
Example 1: how to assign bootstrapswitch using jquery
$('#toggle-state-switch').bootstrapSwitch('state');
$('#toggle-state-switch').bootstrapSwitch('state', false);
$('#toggle-state-switch').bootstrapSwitch('state', false, false);
$('#toggle-state-switch').bootstrapSwitch('toggleState');
$('#toggle-state-switch').bootstrapSwitch('toggleState');
Example 2: how to assign bootstrapswitch using jquery
$('#disable-switch').bootstrapSwitch('disabled');
$('#disable-switch').bootstrapSwitch('toggleDisabled');
$('#disable-switch').bootstrapSwitch('disabled', true);
$('#readonly-switch').bootstrapSwitch('readonly');
$('#readonly-switch').bootstrapSwitch('toggleReadonly');
$('#readonly-switch').bootstrapSwitch('readonly', true);