JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
index.html
jquery.switcher.css
jquery.switcher.js

README.md

#jQuery Switch Plugin

DEMO

###List Of Presets

useWrap
default true
status
default 0
leftLabel
default ON
rightLabel
default OFF
onTurnOn
callback, call when status change to 1
onTurnOff
callback, call when status change to 0

###Default Call

$('#switch').switcher();

###With Custom Text Label

$('#switch').switcher({
    leftLabel: "Moscow",
    rightLabel: "New York"
});

###Default ON

$('#switch').switcher({
    status: 1
});

###Callbacks

$('#switcher_4').switcher({
    onTurnOff: function() {
        alert('Switcher: Turn OFF');
    },
    onTurnOn: function() {
        alert('Switcher: Turn ON');
    }
});

DEMO