ivva
ivva

Reputation: 2949

bootstrapSwitch not displayed properly

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();

switch

Where I am wrong? Thanks!

Upvotes: 1

Views: 700

Answers (1)

Shubham Khatri
Shubham Khatri

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

Related Questions