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
0 answers

Setting Bootstrap Switch Outline Colour On Toggle Focus

In Ruby on Rails, I was struggling for a long time to change the outline border on a Bootstrap Switch toggle button from a default blue outline to the colour I wanted, or finding any information on how to do it. I almost gave up, but then hacked…
Andy Duncan
  • 119
  • 1
  • 4
1
vote
1 answer

bootstrapSwitch on shiny doesn't work

It's simple example from http://shiny.rstudio.com/gallery/widget-gallery.html. After initializing the Bootstrap Switch, the output doesn't change when I click button. Did I miss something? library(shiny) ui <- shinyUI(fluidPage( …
Shane Kao
  • 185
  • 1
  • 11
1
vote
2 answers

Prevent Javascript confirm() on Checkbox State Change

I have a checkbox (which uses the Bootstrap Switch library to act as an on/off toggle) to activate and deactivate users with the help of AJAX. When a user unchecks the box this function is…
Ravioli87
  • 795
  • 13
  • 34
1
vote
0 answers

Bootstrap Switch Event Handler not working on laravel 4

Bootstrap Switch does not toggle, and only loads when the page is reloaded. on the first load I have a result like this : If i reload the page i have the good result : I am working on laravel 4. Any idea? thanks in advance code : {{…
Matthieu
  • 225
  • 1
  • 3
  • 16
1
vote
1 answer

bootstrap-switch is not loading

i have include all the dependencies and i still cannot figure out why it doesn't give me the switch that i want. Am i missing something ? Also i can't get the the post data when i click on my save changes button.
Andy Ho
  • 179
  • 1
  • 3
  • 15
1
vote
1 answer

EmberJS Using Component in Different Context

I am trying to use a different library bootstrap-switch from within EmberJS. I added the following with .on('didInsertElement'): $(toggleTag).on('switchChange.bootstrapSwitch', function(event, state) { this.sendAction('updateAction',…
James Lam
  • 1,179
  • 1
  • 15
  • 21
1
vote
1 answer

Bootstrap Toggle for Checkbox adding extra div

We have a form where users can create a shipping type by entering a name in a text field and optionally toggle a checkbox. To add another shipping type, we use jQuery's clone method to rebuild the fields one or more times. My goal is to change the…
Dawn Green
  • 483
  • 4
  • 16
1
vote
1 answer

Events on model change wont fire

i tried using bootstrap-switch on AngularJS model bound checkbox, but noticed it aint working. further investigation showed that Javascript onChange/onClick Events are not firing at all when the model change modifies the checkbox. as illustrated in…
Tomer W
  • 3,395
  • 2
  • 29
  • 44
1
vote
1 answer

Disambiguating bootstrap-switch state changes in knockout

I'm using bootstrap-switch together with the knockout binding handler referenced from this question shown below: ko.bindingHandlers.bootstrapSwitchOn = { init: function (element, valueAccessor, allBindingsAccessor, viewModel) { $elem =…
1
vote
1 answer

bootstrap switch d3 on change event

I'm putting together a d3 visualization that makes use of bootstrap and the bootstrap-switch libraries. I've got a set of switches that are being generated by d3 which I'd like to listen to so that I can update the visualization based on their…
Constantino
  • 2,243
  • 2
  • 24
  • 41
1
vote
1 answer

Laravel 4 and Bootstrap Switch

I am trying to use the Bootstrap Switch (http://www.bootstrap-switch.org) with the latest version of Laravel (4.2.8) however I am new to learning this framework and PHP. I have referenced the four required files within the head of my main…
1
vote
0 answers

Jquery validation depends bootstrap switch

I want to use validation on a date field (seguro_resp_civil_validade). This field only needs to be validated when the bootstrap switch (seguro_resp_civil) is "ON". I have this piece of code: seguro_resp_civil_validade: { required: { depends:…
Mario Cordeiro
  • 119
  • 4
  • 15
0
votes
1 answer

Show a Bootstrap-Modal on button-click if certain switch-state is true

there have been several related posts here and through the net but i am not so good with javascript (and I´m pretty sure, it will end up in a JS solution) and dind't yet find a solution by reading them... What i want, is to give user the option…
0
votes
3 answers

how to change a bootstrap switch from ON state to OFF state using javascript

how to change a bootstrap switch from OFF state to ON state using javascript. the switch html code is below,
Mary
  • 1
  • 2
0
votes
1 answer

bootstrapSwitch Don't toggle switch on click

I have a bootstrap switch, but I don't want it to toggle everytime. I want to check that a condition is true, and only then toggle the switch. How can I do that? This is what I have so far: $("[name='relVal']").bootstrapSwitch({ onSwitchChange:…
1 2 3
8 9