JSFiddle - React, Tailwind, and code Playground
by James Joung
HTML
<div id="checkbox-container">
<div class="hidefull">
<input type="checkbox" value="hideFull" id="check-hide-full-table">Hide Full
</div>
<div class="hideempty">
<input type="checkbox" value="hideEmpty" id="check-hide-empty-table">Hide Empty
</div>
</div>
JavaScript
$(document).ready(function() {
$('input').on('change', function() {
if ($(this).attr("checked")) {
$(this).attr("checked", false);
} else {
$(this).attr("checked", true);
}
});
});