Questions tagged [bootstrap-switch]

The bootstrap switch is a Twitter bootstrap plugin, that turns checkboxes and radio buttons into toggle switches.

Bootstrap switch is a twitter bootstrap plugin, that turns checkboxes and radio buttons into toggle switches. The use of bootstrap switch is straight forward bootstrap-like :

<input type="checkbox" name="my-checkbox" checked>
$("[name='my-checkbox']").bootstrapSwitch();

The bootstrap switch supports features such as toggle animation, different colors and text for different states (on, off, indeterminate), and events for detecting user input.

Site: http://bootstrapswitch.com/

Github: https://github.com/nostalgiaz/bootstrap-switch

122 questions
17
votes
2 answers

disabling and enabling bootstrap switch using jquery

I am using bootstrap switch and currently got stuck as there aren't any strong documentation or examples that I could get access to.
user4826347
  • 783
  • 2
  • 11
  • 29
14
votes
1 answer

How to customize bootstrap switch color

How can I customize bootstrap switch color to the desired color? I found a oncolor and offcolor but not know how to change them.
Ebrahim
  • 1,740
  • 2
  • 25
  • 31
11
votes
4 answers

bootstrap switch setState using a jquery function

I'm trying to set the state of a bootstrap switch with two external buttons, this is the code:
pablinho
  • 213
  • 1
  • 4
  • 13
9
votes
1 answer

Bootstrap Switch - Change state after clicking on button

I am using Bootstrap Switch plugin and Bootstrap Modal. Once the user clicks to change the Switch from on to off the Modal box fades in asking for a confirmation. How do I change the Switch from on to off or from off to on only after the user clicks…
brunodd
  • 2,474
  • 10
  • 43
  • 66
9
votes
3 answers

bootstrap-switch how to show large label text

I am using twitter bootstrap-switch plugin in to show a checkbox with two options. It works well for checkboxes with small label text like "yes/no". However, when it comes to bigger label text like "Normal/Abnormal", then part of text is not visible…
Sebastian
  • 4,625
  • 17
  • 76
  • 145
7
votes
1 answer

bootstrap switch setState gives js error

I am trying to change state of bootstrap switch with condition return value from Ajax, HTML,
rjcode
  • 1,193
  • 1
  • 25
  • 56
6
votes
1 answer

Disable bootstrap switch after onswitchchange

I am new at coding with bootstrap and jquery. how can i disable bootstrap switch in "onswitchchange" method option Here my javascript/jquery code: $("input[type=checkbox]").bootstrapSwitch({ size:"mini", onSwitchChange:function(event, state)…
Fadhil Ahmad
  • 1,097
  • 11
  • 19
6
votes
3 answers

Javascript array.push() do not add but replace it

I have some checkboxes styled with bootstrapSwitch. I wrote a script that have to add value of checkbox to an array when bootstrapSwitch state is true. This is my code : $('input[name^=skill]').on('switchChange.bootstrapSwitch', function (event,…
Kiyarash
  • 2,437
  • 7
  • 32
  • 61
6
votes
3 answers

Bootstrap Switch - ON state

I am using this bootstrap switch library. I have a checkbox in my html. Now, it is always showing in the OFF state, even though its checked property is set to true when the document is loaded. What do I need to do besides that? Edit - What I…
user2171262
  • 123
  • 1
  • 2
  • 9
4
votes
1 answer

Bootstrap Switch fn is not a function

I'm trying to add bootstrap switch to a rails project. When I add my script from here as this: I end up…
4
votes
4 answers

css style does not applied properly in chrome for bootstrap switch

I'm trying to turn a checkbox into a Bootstrap Switch. It works fine in IE, but it isn't styled properly in in Chrome. What's going wrong? it is even happening if i simple download the bootstrap-switch code from the site. create a new empty web app…
Raas Masood
  • 1,475
  • 3
  • 23
  • 61
3
votes
0 answers

Bootstrap Switch not working on IE11?

I can't seem to get my Bootstrap Switch to work in IE11, however it works for Chrome and Edge. Here is the HTML snippet:
3
votes
1 answer

disable a input box with bootstrap-switch toggle

I'm trying to disable/enable a input box within a table when I toggle with a bootstrap-switch button. …
jashuang1130
  • 429
  • 7
  • 21
3
votes
1 answer

Binding onclick event to bootstrap-switch

I'm building a form that's supposed to hide and show content according to bootstrap-switch selections made by the user. The onclick="documentFilter event works on normal check-boxes; however, the moment I initialise bootstrap-switch, the code does…
Zengetsu
  • 109
  • 1
  • 8
3
votes
1 answer

bootstrap-switch does not fire checkedchanged on asp.net checkbox

I'm using two asp.net ckeckboxes (chk1, and chk2) in a Web Forms project with MasterPage, and I'd like when I click over chk1, the chk2 becomes disable and viceverse without refreshing the entire page, so I'm using updatepanel to achieve this, I…
JoseA
  • 33
  • 1
  • 6
1
2 3
8 9
Number Inputbox checkbox