JSFiddle - React, Tailwind, and code Playground
HTML
<input type='checkbox' id="mycheckbox"/>
<label for="mycheckbox"> CLICK ME....</label>
JavaScript
$('input[type=checkbox]').on('click',function() {
var checkboxStatus = $('input[type=checkbox]').prop('checked');
alert(checkboxStatus);
if(checkboxStatus)
{
alert('now checkbox is checked');
}
else
{
alert('now checkbox is unchecked');
}
});