FancyCheckbox is a simple and lightweight (less then 1k min and gziped) jQuery plugin to create iPhone styled checkboxes based on this tutorial and created By the need of a GPL licensed
##Usage: Include nessesary JS and CSS files
<link rel="stylesheet" type="text/css" media="screen, projection" href="FancyCheckbox.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="FancyCheckbox.js"></script>Then simple call the plugin on any element you want (assuming that is a checkbox)
<script>
jQuery(document).ready(function($) {
//all checkboxes
$(":checkbox").FancyCheckbox();
});
</script>###Options:
| Option | Defualt | Description |
|---|---|---|
| style | iphone | (string) accepts iphone,firerift, what type of fancycheckbox to create |
| offClass | no-fancy | (string) class to disable, elements with this class will not be fancy |
###Events:
| Name | Description |
|---|---|
| beforeLoad | Triggered just before the fancy checkbox is loaded to the DOM |
| afterLoad | Triggered just after the fancy checkbox is loaded to the DOM |
| beforeChangeIphone | Triggered just before the fancy checkbox (iPhone styled) is changed |
| afterChangeIphone | Triggered just after the fancy checkbox (iPhone styled) is changed |
| beforeChangeFirerift | Triggered just before the fancy checkbox (Firerift styled) is changed |
| afterChangeFirerift | Triggered just after the fancy checkbox (Firerift styled) is changed |
##Author Ohad Raz http://en.bainternet.info ##License:
Copyright © 2012 Ohad Raz, [email protected] ,Dual licensed under the MIT and GPL licenses.
