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
1
vote
1 answer

AngularJs ng-repeat track by $index issue with angular-bootstrap-switch

I am having an issue with AngularJs ng-repeat and angular-bootstrap-switch I am using: ng-repeat="item in items track by $index" When I added a new item into the first index of array by: newItem = {}; items.splice(0, 0, newItem); The DOM…
1
vote
0 answers

Bootstrap Switch showing two switches with Rails and Simple Form

I'm using the Bootstrap Switch Gem with Ruby on Rails and the Simple Form Gem. As per the Bootstrap Switch instructions I've initialised the switch as follows: $(document).ready(function() { $("[input='radio']").bootstrapSwitch(); }); However…
DanRio
  • 453
  • 2
  • 4
  • 20
1
vote
0 answers

Selection of Bootstrap switch group

There are many switches in my table, so I want to switch(on/off) every switch separately. But in here when I switch some one it affect for the all i think that is dues to it's class. please tell me how to work with each switch without effecting to…
Sampath Wijesinghe
  • 789
  • 1
  • 11
  • 33
1
vote
1 answer

Setting Bootstrap-Switch checkbox checked state with PHP or jQuery

I need to set the state of a checkbox using bootstrap-switch based on values from a mysql database. I am trying to do it with PHP like this but it doesn't seem to work, the code is an excerpt: while ($row = $result->fetch_assoc()) { …
Bruno
  • 511
  • 2
  • 6
  • 19
1
vote
0 answers

rails bootstrap-switch, cannot display toggled status

i know this question had been asked so many times but despite researching for the past 2 days i still can't get the solution. currently i implemented bootstrap-switch into my rails apps. after toggling from off to on, the database updated the…
ckeat9
  • 162
  • 1
  • 14
1
vote
1 answer

BootStrap Switch added with javaScript doesn't fire events

EDITED, go below I have a table and it has a row click event for each row. The problem is that I've added a switch in the last column ("BootstrapSwitch") and that switch doesn't trigger neither state change or click event because the row click event…
Rubén M
  • 107
  • 1
  • 1
  • 13
1
vote
1 answer

bootstrap-switch: Disable/Enable other options on change

I use bootstrap-switch and have different buttons. Givs a change, that i can give other attributes as parameter like this sample:
user2682722
1
vote
1 answer

How to change background color in bootstrap switcher custom checkbox?

I've customized a checkbox in Bootstrap switcher plugin (https://github.com/nostalgiaz/bootstrap-switch). How to make green color change to red on toggle? Tried this: $( ".bootstrap-switch" ).click(function() { $( this ).toggleClass( "highlight"…
rinatoptimus
  • 427
  • 1
  • 5
  • 21
1
vote
1 answer

bootstrap switch getting value on change

I am using bootstrap switch for setting value to NO when its OFF and Yes when its ON, in HTML, in JS …
rjcode
  • 1,193
  • 1
  • 25
  • 56
1
vote
1 answer

How to set data-off message as blank instead of "off", in bootstrap switch?

Below is the code snippet of my bootstarp toggle button. Here I have set the data-off as blank string although its showing message as off. How can I set it as blank string ?
TIGER
  • 2,864
  • 5
  • 35
  • 45
1
vote
0 answers

display message when 2 bootstraptoggle checkboxes are selected

I am trying to get a message to pop up when a user selects 2 bootstrap toggle checkboxes. I have this set up so far: My html:
1
vote
0 answers

Bootstrap Switch doesn't render properly at the first time

When user is visiting my webpage, bootstrap switch doesn't render properly at the first time, look: Then, other times normal: What I think is happening is that the page is rendering first than the Bootstrap Switch! Even using the Jquery ready…
Lara
  • 2,170
  • 6
  • 22
  • 43
1
vote
1 answer

Associate row of datatable to bootstrap switch (using another column field)

I'm using datatables and bootstrap switch plugins to enable and disable users. When I click on switch I call a web service throught ajax and my rest web services switch status of user into database. The problem is know whitch user is selected from…
luca
  • 3,248
  • 10
  • 66
  • 145
1
vote
1 answer

NO/YES iOS like button with modal on YES

How can I create iOS like sliding button with NO/YES state, which opens modal window when it's on YES? Can this be done with bootstrap? I found this code that I could use but I need someone to edit JS code so that modal only is shown on button YES…
Dennis
  • 751
  • 6
  • 9
1
vote
1 answer

Bootstrap switch inside datatables plugin with ajax call catch event

I'm using datatables plugin and I have a problem with bootstrap switch. This is my javascript code, where I create a switch with the value retrieved from ajax call: $(document).ready(function() { if ( ! $.fn.DataTable.isDataTable( '#usersTable'…
luca
  • 3,248
  • 10
  • 66
  • 145
1 2
3
8 9