Html SwitchButton

Invoke the toggle method of the jqxSwitchButton. Author: http://jqwidgets.com

by jqwidgets

HTML

<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="http://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<div id="jqxSwitchButton"></div>
<div>
    <input style="margin-top: 20px;" type="button" id='jqxButton' value="Toggle the button" />
</div>

JavaScript

$('#jqxSwitchButton').jqxSwitchButton({
    height: 35,
    width: 80,
    checked: true,
    theme: 'energyblue'
});
$("#jqxButton").jqxButton({
    height: '30px',
    width: '140px',
    theme: 'energyblue'
});
$('#jqxButton').on('click', function () {
    $('#jqxSwitchButton').jqxSwitchButton('toggle');
});