Bootstrap-switch
========================
Demo
----
http://www.larentis.eu/switch/
Usage
-----
Just include Twitter Bootstrap, jQuery, Bootstrap Switch CSS and Javascript
``` html
```
Less
----
If you want to use your bootstrap vars edit bootstrapSwitch.less and then compile the less file
``` bash
lessc static/less/bootstrapSwitch.less static/stylesheets/bootstrapSwitch.css
```
Basic Example
-------------
``` html
```
Large, small or mini
--------------------
``` html
```
Colors
------
``` html
```
Animation
---------
``` html
```
Text
-----
``` html
```
HTML Text
----------
``` html
```
Initial values
--------------
``` html
```
Event handler
-------------
``` javascript
$('#mySwitch').on('switch-change', function (e, data) {
var $el = $(data.el)
, value = data.value;
console.log(e, $el, value);
});
```
Methods
-------
``` javascript
$('#mySwitch').bootstrapSwitch('toggleActivation');
$('#mySwitch').bootstrapSwitch('isActive');
$('#mySwitch').bootstrapSwitch('setActive', false);
$('#mySwitch').bootstrapSwitch('setActive', true);
$('#mySwitch').bootstrapSwitch('toggleState');
$('#mySwitch').bootstrapSwitch('setState', true);
$('#mySwitch').bootstrapSwitch('status'); // returns true or false
$('#mySwitch').bootstrapSwitch('destroy');
```
License
-------
Licensed under the Apache License, Version 2.0
http://www.apache.org/licenses/LICENSE-2.0