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