JSFiddle - React, Tailwind, and code Playground
HTML
<form id="myform">
<div>
<input type="checkbox" />
<input type="checkbox" />
<input type="checkbox" />
<fieldset>
<input type="checkbox" />
<input type="checkbox" />
</fieldset>
</div>
<div>
<input type="checkbox" />
<input type="checkbox" />
<input type="checkbox" />
</div>
</form>
CSS
div {
border: 1px solid black;
margin-bottom: 1px;
}
fieldset {
border: 1px solid red;
margin-bottom: 1px;
}
JavaScript
$("#myform").click(function(e) {
if ($(e.target).is("input:checkbox")) {
$("input:checkbox", this).not(e.target).removeAttr("checked");
}
})