🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Sswitch is a very lightweight (~3kb unminified) jQuery plugin which allows to replace the normal checkbox input with an iPhone style on/off toggle switch.

Checkbox Switch

Documentation

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 :)


You May Also Like