JSFiddle - React, Tailwind, and code Playground
HTML
<div>
foo
<input type="checkbox">
</div>
JavaScript
$("div").click(function() {
alert("add");
});
$(":checkbox").click(function(e) {
if(!$(this).is(":checked")) {
alert("remove");
e.stopPropagation();
}
});