JavaScript CheckBox

Invoke the destroy method of the jqxCheckBox. Author: http://jqwidgets.com

by jqwidgets

HTML

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

JavaScript

$("#jqxCheckBox").jqxCheckBox({
    width: '300px',
    height: 25,
    theme: 'energyblue'
});
$("#jqxButton").jqxButton({
    height: '30px',
    width: '120px',
    theme: 'energyblue'
});
$('#jqxButton').on('click', function () {
    $('#jqxCheckBox').jqxCheckBox('destroy');
});