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

Disable textarea on checkbox :checked with bootstrap-switch

I have an MVC app where I have a class of bools. There is a textarea next to each switch to enter comments if the item is indicated as rejected (returns false). I need to have the textarea disabled if the the swith is set to Accepted (returns…
New2ASPMVC
  • 102
  • 1
  • 11
0
votes
1 answer

bootstrap Switch - on change state update db - internal server error

This is my first time using the bootstrap switch. Im trying to update data on the database when it changes the state. So i have
Andre Mendes
  • 7,307
  • 4
  • 14
  • 24
0
votes
2 answers

How to initialize bootstrapSwitch()?

I am missing something simple, but can'T find it. In my asp.net MVC5 project, I want to use bootstrap-switch. This is what I've done: BundleConfig.cs: added bootstrap-switch.css and bootstrap.switch.js as follows, bundles.Add(new…
EluciusFTW
  • 2,565
  • 6
  • 42
  • 59
0
votes
1 answer

Bootstrap-Switch on Modal loaded from remote page

I'm trying to use Bootstrap-Switch to toggle my checkboxes. It works fine on a normal page, or a modal thats pre-loaded into the page. However, if I load the modal from a remote page (a href=something.html) the toggle does not work/display. …
Robert Guice
  • 609
  • 1
  • 5
  • 12
0
votes
1 answer

Bootstrap switch working with only one state

I am using the Bootstrap Switch library but after writing the following code, I'm able to pass only the 'True/Yes/on' value to the backend. The other state is not being passed at all. HTML:
Harsh Gupta
  • 173
  • 5
  • 16
0
votes
2 answers

Bootstrap Switch, how to remove the border radius of the whole switcher

I just used bootstrap-switch - v3.3.1, I don't need the border radius so I set border-radius:0 !important; to .bootstrap-switch.bootstrap-switch-focused like this: http://jsfiddle.net/q2zEk/1/. .bootstrap-switch.bootstrap-switch-focused { …
JaskeyLam
  • 15,405
  • 21
  • 114
  • 149
0
votes
0 answers

Bootstrap Switch not firing SetState event in angular directive

i am using a Wrapbootstrap template. and converted it into a single page application using its routing and ng-view kind of a stuff. this third party template seems to be using bootstrap switch. but its not referencing bootstrap-switch.js, instead…
0
votes
1 answer

nothing happens when using bootstrap-switch

I'm unable to run the bootstrap switch in my application. In my gemfile, I have gem 'bootstrap-switch-rails', '~> 3.0.0' In my application.html.haml I have (I put a breakpoint: it is executed after loading) :javascript $(function() { …
0
votes
2 answers

Multiple jquery events with same execution - how to combine?

I've found many threads on combining click and change jquery events. But I'm not sure how to combine a basic click event with this specific event for Bootstrap Switch. The following two events should have the same code. What is the best way to…
Lindsay
  • 127
  • 1
  • 3
  • 11
0
votes
1 answer

How to call a knockout function with bootstrap-switch.js binding?

I'm trying to show my data in a table but instead of checkbox show something fancy like http://www.bootstrap-switch.org/ I've managed to build my table and handle the plugin using this binding ko.bindingHandlers.bootstrapSwitchOn = { init:…
Icepick
  • 159
  • 1
  • 10
0
votes
1 answer

jQuery bootstrap-switch 3.0.2 is not triggering change event on the input

I've just updated the jQuery bootstrap-switch plugin to the latest version that includes so many interesting and cool features, but I'd a working code that looks like: var $checkbox =…
Cristian Rojas
  • 2,746
  • 7
  • 33
  • 42
0
votes
1 answer

jQuery infinite recursion when tring to call a plugin on elements added on the DOM

EDIT: http://jsfiddle.net/J26Dw/ (click Add) I want to call, for every checkbox marked with the attribute data-widget="bootstrap-switch", the bootstrapSwitch() plugin. This works fine with this simple function: $(function () { var activator =…
gremo
  • 47,186
  • 75
  • 257
  • 421
0
votes
2 answers

bootstrap switch checking checked status always returns false

I don't want to listen for the event of the switch being toggled, instead I want to use JavaScript to check it's current checked state. I have this simple JavaScript to check…
ldeluca
  • 934
  • 3
  • 12
  • 25
0
votes
1 answer

bootstrap-switch LESS client-side usage not working

Has anyone downloaded the bootstrap-switch from http://www.bootstrap-switch.org and modified the index.html to use the src/less/bootstrap3/build.less instead of the css file and add the less compiler from http://lesscss.org/#client-side-usage and…
user1753622
  • 287
  • 3
  • 19
-1
votes
1 answer

bootstrap-switch and ajax-reloading

I have html-code for beautiful checbox witch:
And also javascript code, w want to use in ajax reloading. Why it doesn't work: $(document).ready(function () { $('#cbtestb').html('
user2301515
  • 4,903
  • 6
  • 30
  • 46
1 2 3
8
9