Sswitch
Author : Gopal Joshi
Website: www.sgeek.org
Plugin : sScroll
Description: sSwitch is toggle switch. Turn checkboxes and radio buttons into toggle switches.
Tutorial: http://sgeek.org/jquery-toggle-button-plugin-for-sliding-toggle-switches-sswitch/
Usage:
Include CSS and JS
<link rel="stylesheet" type="text/css" href="css/style.css" /> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/Sswitch.js"></script>
Add checkbox having class name "checkbox".
<input type="checkbox" name="checkboxName" class="checkbox" />
Initialise plugin
<script> $(document).ready(function(){ $(".checkbox").Sswitch({ onSwitchChange: function() { // Your magic } }); }); </script>
That's it :)