Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vxsx/jquery.iswitch.js
iphonelike switch jquery plugin
https://github.com/vxsx/jquery.iswitch.js
Last synced: about 5 hours ago
JSON representation
iphonelike switch jquery plugin
- Host: GitHub
- URL: https://github.com/vxsx/jquery.iswitch.js
- Owner: vxsx
- Created: 2011-01-22T08:07:11.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-03-12T16:04:02.000Z (over 12 years ago)
- Last Synced: 2024-04-17T02:58:36.386Z (7 months ago)
- Language: JavaScript
- Homepage: http://vxsx.github.com/jquery.iswitch.js/
- Size: 196 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
#jquery.iswitch.js
Plugin that makes iphone-like checkboxes
Requires* jquery 1.4.4 or higher
* jquery ui 1.8.9 or higherDefault options
``` javascript
labelsOutside: false
clickable : true
draggable : true
```Using:
``` html
$('#switch').iswitch();
```
You can also set labels not only from data-attributes, but from javascript too, like``` javascript
$('#switch').iswitch({
trueLabel: 'this is a true label',
trueColor: '#00FF00',
falseLabel: 'false label',
falseColor: 'red'
});
```
in case you set it both ways, js version have a prioritycolor attributes are optional, but if set, then they must be set both (you can use `transparent` anyway), see the [demo](http://vxsx.github.com/jquery.iswitch.js)
Note
-------
I just needed the iphonish switch for our company's inner project, and because none of the available on the web solutions worked for me, i did this using css3 and jquery. No, it's not crossbrowser and it's likely never be.TODO:
-----* tweak animation with outside labels
* rewrite all js, just too messy :D
* disabled state (really don't want this)
* need nice demo-page :)