How can I change some bootstrap switch
CSS classes dynamically if the state changes to true or false? In fact, if it is possible, appending a new class also may solve my problem. Is there any simple and useful way to do it? I tampered with documentation but found nothing.
The onSwitchChange
event is well enough for this situation but I need some help with it.
Update
I attached an image that tells what I want to achieve.
I think CSS is the right way to go with what you are trying to achieve, all you need to do is enclose your switch inside a parent div and then write some CSS
.parent-div .boostrap-switch-on{
//enter styles for the ON state
}
.parent-div .boostrap-switch-off{
//enter styles for the OFF state
}