JSFiddle - React, Tailwind, and code Playground
by Shree Khanal
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
<tr>
<td><input type=checkbox id="cb" autocomplete='off' onchange="CheckVisibility()" /></td>
<td><label id="label" style="display : none">Monday</label></td>
</tr>
</table>
JavaScript
CheckVisibility();
function CheckVisibility() {
if ($('#cb').is(':checked')) {
$('#label').show()
} else {
$('#label').hide()
}
}
window.onhashchange = function(e) {
alert();
if ($('#cb').is(':checked')) {
alert('checked');
e.preventDefault();
return false;
} else {
alert('un-checked');
}
}