jQuery Switch Plugin on GitHub.
useWrap
- default truestatus
- default 0leftLabel
- default ONrightLabel
- default OFFonTurnOn
- callback, when status change to 1onTurnOff
- callback, when status change to 0$('#switcher_1').switcher();
$('#switcher_2').switcher({ leftLabel: "Moscow", rightLabel: "New York" });
$('#switcher_3').switcher({ status: 1 });
$('#switcher_4').switcher({ onTurnOff: function() { alert('Switcher: Turn OFF'); }, onTurnOn: function() { alert('Switcher: Turn ON'); } });
jQuery Switch Plugin on GitHub.