stansmet / jFlipswitch

jQuery plugin to create beautiful on/off flip switch http://proto.io/freebies/onoff/ from standard checkbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jFlipswitch

jQuery plugin to create beautiful on/off flip switch http://proto.io/freebies/onoff/

##Installation

<link href="jquery.flipswitch.css" rel="stylesheet">

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="jquery.flipswitch.js"></script>

<script>
    $(function() {
        $('input[type=checkbox]').flipswitch({
            onLabel: 'On',
            offLabel: 'Off',
            onOnState: function() { 
                console.log('on state!') 
            },
            onOffState: function() {
                console.log('off state!')
            },
            onChangeState: function() {
                console.log('state changed!')
            }
        });
    });		
</script>

About

jQuery plugin to create beautiful on/off flip switch http://proto.io/freebies/onoff/ from standard checkbox

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:CSS 50.6%Language:JavaScript 49.4%