Reputation: 2241
I am using Bootstrap Switch in my project to show a warning flag. Each time I try to set value of switch from false to true dynamically it is not going in .bootstrapSwitch().on
method. It is working fine on changing switch state from false to true dynamically. Fiddle below-
Upvotes: 0
Views: 4938
Reputation: 640
Set third parameter to false and it works.
$('#toggleSwitchOn').click(function () {
$('#bootstrapswitch').bootstrapSwitch('state', true, false);
});
Upvotes: 3