https://github.com/zgldh/bootstrap-switch-avaloncompatible
AvalonJS can't work with the original Bootstrap-Switch. That's why I made this one.
https://github.com/zgldh/bootstrap-switch-avaloncompatible
Last synced: about 1 year ago
JSON representation
AvalonJS can't work with the original Bootstrap-Switch. That's why I made this one.
- Host: GitHub
- URL: https://github.com/zgldh/bootstrap-switch-avaloncompatible
- Owner: zgldh
- License: apache-2.0
- Created: 2014-11-06T09:54:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-06T12:14:52.000Z (over 11 years ago)
- Last Synced: 2025-01-25T19:30:36.687Z (over 1 year ago)
- Size: 188 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bootstrap-switch-avaloncompatible
=================================
AvalonJS can't work with the original Bootstrap-Switch. That's why I made this one.
##Demo:
[http://www.idagou.com/bootstrap-switch-avaloncompatible.html](http://www.idagou.com/bootstrap-switch-avaloncompatible.html)
##Usage:
1 Add .js and .css files
```HTML
```
> You can use the original css file from Bootstrap Switch 3.
2 Add `input` tag into your HTML code
```HTML
```
3 Add `$switch_option` to your AvalonJS view-model
```JavaScript
var vm = avalon.define({
my_switch: true,
$switch_option:{
state: true,
size: 'large',
animate: true,
onSwitchChange: function(event,state){
vm.my_switch = state;
}
}
})
```
4 Refresh your page
##Options:
All the same options with Bootstrap Switch 3 [http://www.bootstrap-switch.org/options-3.html](http://www.bootstrap-switch.org/options-3.html).
I have made all options working except `indeterminate`,`inverse`,`radioAllOff`.
Help yourself to re-write it into AMD/CMD pattern.
Enjoy it.