Bootstrap Switch Examples

Free Online Form Builder

Create online forms for free.
Try JotForm Form Builder

Stay Updated

Subscribe to Bootsnipp newsletter. (only important updates will be sent, your email is never shared or sold to anyone else)


Recent Comments

toggle buttons are generated dynamically. code is as fellows : <div class="row col-md-12 col-sm-12" id="DivTS" style="display:block"> @{ for (var i = 0; i < 7; i++) { var chkID = "chkStatus_" + (i + 1); <div class="row" style="clear:both"> <div class="col-md-2"> <div class="onoffswitch1" id="toggle"> <input type="checkbox" name="onoffswitch1" onclick="return fnTimeSlotStatusChange()" class="onoffswitch1-checkbox" id=@chkID checked> <label class="onoffswitch1-label" for=@chkID> <span class="onoffswitch1-inner toggleOn" id=@chkID></span> <span class="onoffswitch1-switch"></span> </label> </div> </div> } }</div>
Flat Toggle Switch

how to get a multiple toggle values
Flat Toggle Switch

Hi. I needed that to. I found out that this do the trick:<% If yourboolianvariable = true Then %> <script type='text/javascript'> window.onload = function(){ document.getElementById("yourcheckboxid").checked = true; } </script><% End If %>
Material Design Switch

Very handy--much cleaner and simpler than a lot of implementations out there.One question: Do you have recommendations on how to read/set the state of the switch using javascript?
Material Design Switch



Considering A New Car?

You should consider a Tesla. Get 6 Months Free Supercharging.

Tesla Referral Code