Material Design Toggle Switch Plugin with jQuery - ToggleSwitch

File Size: 3.31 KB
Views Total: 10729
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Material Design Toggle Switch Plugin with jQuery - ToggleSwitch

ToggleSwitch is an ultra-light jQuery plugin that converts normal checkboxes into Material Design inspired on / off toggle switches with smooth animations powered by CSS3 transitions.

How to use it:

1. Load the required ToggleSwitch.css in the head section of the document.

<link rel="stylesheet" href="ToggleSwitch.css">

2. Create a normal checkbox input for the toggle switch.

<input type="checkbox" name="switch" id="switch">

3. Load the ToggleSwitch.js script after jQuery library, but before the closing body tag.

<script src="jquery.min.js"></script>
<script src="lib/ToggleSwitch.js"></script>

4. Initialize the plugin and we're done.

$("#switch").toggleSwitch();

This awesome jQuery plugin is developed by sagark1510. For more Advanced Usages, please check the demo page or visit the official website.