JSFiddle - React, Tailwind, and code Playground
by briguy37
HTML
<div>
Without JQuery Function: <input type="checkbox"/>
</div>
<div>
With JQuery Function: <input type="checkbox" id="radioinstant"/>
</div>
JavaScript
$('#radioinstant').click(function() {
var checked = $(this).attr('checked');
alert(checked);
if (checked) {
$(this).attr('checked', false);
}
else {
$(this).attr('checked', true);
}
});