Bootstrap-Switch options do not take effect

I use Bootstrap-Switch, and the documentation says that parameters can be passed as an object during initialization. enter the link here

And here is a list of options: enter the link here

So my code looks like this:

var options = { onText: "Yes", onColor: 'primary', offColor: 'danger', offText: "No", animate: true, }; $("[name='radioGroup1']").bootstrapSwitch(options); 

And all this works fine, but none of the default parameters are overwritten by the parameters.

Does anyone have examples of how this might work?

+6
source share
1 answer

The problem was that I did not check which version of Bootstrap-Switch I used. Works great on code in version 3

+5
source

Source: https://habr.com/ru/post/970273/


All Articles