JSFiddle - React, Tailwind, and code Playground
by tomgrohl
HTML
<form id="frm">
<input id="target1" type="checkbox" type="checked" />
<input id="target2" type="checkbox" type="checked" />
<input id="target3" type="checkbox" type="checked" />
<input type="button" value="Check" onclick='$("#target1").attr("checked","checked")'/>
<input type="button" value="Uncheck - fail" onclick='$("#target1").attr("checked","")'/>
<input type="button" value="Uncheck - good" onclick='$("#target1").removeAttr("checked")'/>
</form>
JavaScript
$("#target1").attr("checked", "");
$("#target2").attr("checked", false);
$("#target3").attr("checked", "");