Reputation: 2949
I'm using bootstrapSwitch but it isn't displayed properly. It looks like that and its state can't be changed. I tried with the following code:
<input type="checkbox" name="my-checkbox" checked>
$("[name='my-checkbox']").bootstrapSwitch();
Where I am wrong? Thanks!
Upvotes: 1
Views: 700
Reputation: 281696
Include the bootstrap-switch.min.css and bootstrap-switch.min.js from this cdn: https://cdnjs.com/libraries/bootstrap-switch
Also include bootstrap.min.css and it just works perfectly fine.
<input type="checkbox" name="my-checkbox" checked>
$("[name='my-checkbox']").bootstrapSwitch();
See this jsfiddle: https://jsfiddle.net/mayank_shubham/deg4ztf4/
Upvotes: 1