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 />
<div class="markerDiv" id="maker_school"><label class="marker_label">School</label> <input class="marker_ckeckbox" name="markerType" value="school" type="checkbox" /> </div> <br />
<div class="markerDiv" id="maker_school"><label class="marker_label">School</label> <input class="marker_ckeckbox" name="markerType" value="school" type="checkbox" /> </div> <br />
JavaScript
$(".markerDiv").click(function (e) {
if (!$(e.target).is('input:checkbox')) {
var $checkbox = $(this).find('input:checkbox');
$checkbox.prop('checked', !$checkbox.prop('checked'));
}
});