JSFiddle - React, Tailwind, and code Playground
by techunter
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 () {
var $checks = $(this).find('input:checkbox[name=markerType]');
$checks.prop("checked", !$checks.is(":checked"));
alert($checks.is(":checked"));
});