Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 espaco 1
# Bootstrap Switch
2
[![Dependency Status](https://david-dm.org/nostalgiaz/bootstrap-switch.svg?theme=shields.io)](https://david-dm.org/nostalgiaz/bootstrap-switch)
3
[![devDependency Status](https://david-dm.org/nostalgiaz/bootstrap-switch/dev-status.svg?theme=shields.io)](https://david-dm.org/nostalgiaz/bootstrap-switch#info=devDependencies)
4
[![NPM Version](http://img.shields.io/npm/v/bootstrap-switch.svg)](https://www.npmjs.org/)
5
 
6
Turn checkboxes and radio buttons in toggle switches.
7
 
8
## Demo and Documentation
9
http://www.bootstrap-switch.org
10
 
11
## Usage
12
 
13
Include the dependencies: jQuery, Bootstrap and Bootstrap Switch CSS + Javascript:
14
 
15
``` html
16
[...]
17
<link href="bootstrap.css" rel="stylesheet">
18
<link href="bootstrap-switch.css" rel="stylesheet">
19
<script src="jquery.js"></script>
20
<script src="bootstrap-switch.js"></script>
21
[...]
22
```
23
 
24
Add your checkbox:
25
 
26
```html
27
<input type="checkbox" name="my-checkbox" checked>
28
```
29
 
30
Initialize Bootstrap Switch on it:
31
 
32
```javascript
33
$("[name='my-checkbox']").bootstrapSwitch();
34
```
35
 
36
Enjoy.
37
 
38
## Less
39
 
40
If you want to use your bootstrap variables, include `bootstrap-switch.less` in your compilation stack. You can even choose among Bootstrap versions 2.3.2 or 3.*.* compatible source.
41
 
42
## AngularJs
43
Two custom directives are available:
44
- [angular-bootstrap-switch](https://github.com/frapontillo/angular-bootstrap-switch)
45
- [angular-toggle-switch](https://github.com/JumpLink/angular-toggle-switch)
46
 
47
## KnockoutJs
48
A Knockout binding handler is available [here](https://github.com/pauloortins/knockout-bootstrap-switch)
49
 
50
## NuGet
51
A NuGet package is available [here](https://github.com/blachniet/bootstrap-switch-nuget)
52
 
53
## Supported browsers
54
 
55
IE9+ and all the other modern browsers.
56
 
57
## License
58
 
59
Licensed under the Apache License, Version 2.0
60
http://www.apache.org/licenses/LICENSE-2.0