JSFiddle - React, Tailwind, and code Playground
HTML
<div class="markerDiv" id="maker_school">
<label class="marker_label">School</label>
<input class="marker_ckeckbox" name="markerType" value="school" type="checkbox" />
</div>
<br />
CSS
.markerDiv {
width:200px;
background:lightgrey;
}
JavaScript
$(".markerDiv").click(function () {
if ($(this).find('input:checkbox[name=markerType]').is(":checked")) {
$(this).find('input:checkbox[name=markerType]').removeAttr("checked");
} else {
$(this).find('input:checkbox[name=markerType]').attr("checked", true);
}
});