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

miniToggle.js is a lightweight jQuery plugin which transforms normal DIV element into an iOS-style smooth toggle button (switch) with variable colors and toggle event supports.

Switch Toggle-Button

Documentation

miniToggle.js

A jQuery plugin to create toggle button

Try it now: http://unstop.github.io/miniToggle.js/

Example

Include:

<script src="js/minitoggle.js"></script> <link rel="stylesheet" href="minitoggle.css"> 

Html:

<div class="toggle"></div> 

JS:

$(document).ready(function() {     $('.toggle').minitoggle();     $('.toggle').on("toggle", function(e){         if (e.isActive)             $(".result").html("Oh, you turn me on.")         else             $(".result").html("No, you turn me off.")     }); }); 

License

miniToggle.js is licensed under MIT http://www.opensource.org/licenses/MIT


You May Also Like