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
0
votes
1 answer

detecting class changes in Bootstrap Switch Jquery (converting working checkbox JS to button js)

I am trying to convert a piece of JQuery that changes the class of a tr when checked to a piece of JQuery that changes the class of a tr when a button gets a class called "active". I am a JQuery/Javascript newbie and I am at a loss. For those who…
NothingToSeeHere
  • 2,253
  • 5
  • 25
  • 57
0
votes
1 answer

bootstrap switch get custom value instead of true false

I am trying to use bootstrap switch with below code in html,
rjcode
  • 1,193
  • 1
  • 25
  • 56
0
votes
1 answer

How to set bootstrap-switch to off using Java?

I am using this switch. I have tried using $("[id='switchId']").bootstrapSwitch('setState', false); to no avail.
user1581390
  • 1,900
  • 5
  • 25
  • 38
0
votes
1 answer

Bootstrap Switch Change Class to State

How can I change some bootstrap switch css classes dynamically if the state changes to true or false? In fact, if it is possible, appending a new class also may solve my problem. Is there any simple and useful way to do it? I tampered documentations…
hsynlms
  • 415
  • 5
  • 15
0
votes
0 answers

Bootstrap Switch extremly long

The result: link to pic my code: <% include partials/template/head.ejs %> <% include partials/template/jsdefaults.ejs %> <% include partials/template/header.ejs %> …
0
votes
1 answer

rails 4 : change state issue with Bootstrap Switch

I have 3 bootstrap switches to handle read/update/create permissions. They area written as : <%= f.check_box :allow_read, :data => { :size=>'medium', 'on-color'=>'success', 'on-text'=> "#{t('yes').upcase}", 'off-text'=> "#{t('no').upcase}"…
user762579
0
votes
1 answer

Properly use bootstrap switch which call c# function (T4MVC/Entity Framework)

I can't find words to explain without code, so here's what I got so far: View: (bootstrap switch) [...] @foreach (var item in Model) {
0
votes
2 answers

Display message upon Switch button toggle

I am using Bootstrap Switch to turn my check-box in toggle switches. Now I want to display different messages based on whether the switch is ON or OFF. Sounds simple enough...but I can't seem to make it work :( My HTML:
AlwaysANovice
  • 983
  • 4
  • 15
  • 34
0
votes
1 answer

Bootstrap Switch Event Handler not working in Safari nor Firefox

PROBLEM: Bootstrap Switch does not toggle in certain browsers, and only loads when the page is reloaded, not on first visit. (Do I need to have this as 2 separate questions?) EXPLANATION: I have been researching this and finally figured out why the…
0
votes
2 answers

Interference between Bootstrap-Switch & Uniform js

I'm using Metronic template. When I use Bootstrap-Switch the checkbox input is still visible on success portion as shown in image. So I discover, that happen because of using UniformJS. As both want to shape inputs, some interfere happens. A way…
Hossein Shahsahebi
  • 6,348
  • 5
  • 24
  • 38
0
votes
1 answer

Bootstrap switch change event not firing when state is changed from 'false' to 'true' dynamically

I am using Bootstrap Switch in my project to show a warning flag. Each time I try to set value of switch from false to true dynamically it is not going in .bootstrapSwitch().on method. It is working fine on changing switch state from false to true…
nickalchemist
  • 2,211
  • 6
  • 31
  • 58
0
votes
0 answers

Couldn't find file 'bootstrap' in rails 4.0.5

Im struck from past two days in the above issue and googled everything but could not find a solution.. So i'm trying to post this question.... I included bootstrap-switch in my application and included that in .css and .js file but im getting the…
Sheharose
  • 295
  • 3
  • 14
0
votes
1 answer

Bootstrap toggle switch: Show modal on click

I am using Bootstrap Switch with a simple on/off option. How do I show a Bootstrap Modal asking for a confirmation once the user changes from on to off or from off to on? Example 1 - User clicks to switch on. Modal: Are you sure you want to switch…
brunodd
  • 2,474
  • 10
  • 43
  • 66
0
votes
1 answer

Bootstrap Switch status not working?

Switch status not working for datatable : I have switches in html string have been checked and unchecked for the DB values. It is not working for the else part only the active/checked switch is shown but the unchecked witch status is not…
0
votes
3 answers

Bootstrap Switch - How can i change a div`s style depending on the toggle`s state?

I`m fairly new to jQuery and I ran into a problem with Bootstrap Switch. here is my fiddle: http://jsfiddle.net/egqjvz7b/3/ I have two divs with the same class but different ids. Both of the divs have toggle switches under them. What I want to do is…
coce
  • 49
  • 9
1 2 3
8 9