Turn checkboxes and radio buttons in toggle switches.
fork from : https://github.com/Bttstrp/bootstrap-switch.git

Mattia Larentis 72bcf83945 remove local jQuery and update documentation vor 12 Jahren
examples 72bcf83945 remove local jQuery and update documentation vor 12 Jahren
static 72bcf83945 remove local jQuery and update documentation vor 12 Jahren
.gitignore 40c9d7eb1d welcome vor 12 Jahren
LICENSE 40c9d7eb1d welcome vor 12 Jahren
README.md 72bcf83945 remove local jQuery and update documentation vor 12 Jahren

README.md

Bootstrap-toggle-buttons

Demo

http://www.larentis.eu/switch/

Usage

Just include Twitter Bootstrap, jQuery, Bootstrap Switch CSS and Javascript

<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
<link href="bootstrap-switch.css" rel="stylesheet">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="jquery.switch.js"></script>

Basic Example

<div class="switch">
    <input type="checkbox">
</div>

Large, small or mini

<div class="switch switch-large">  <!-- switch-small or switch-mini -->
    <input type="checkbox">
</div>

Data attributes

<div class="switch" data-on="danger" data-off="warning">  <!-- primary, info, success, warning and danger -->
    <input type="checkbox">
</div>

Initial values

<div class="switch">
    <input type="checkbox" checked="checked" disabled="disabled">
</div>

Event handler

$('#mySwitch').on('switch-change', function (e, data) {
    var $el = $(data.el)
      , value = data.value;
    console.log(e, $el, value);
});