JSFiddle - React, Tailwind, and code Playground
HTML
<div>test test test<input type="checkbox"/></div>
JavaScript
$("div").click(function(e) {
if (e.target.type == "checfkbox") {
e.stopPropagation();
} else {
var $checkbox = $(this).find(':checkbox');
$checkbox.attr('checked', !$checkbox.attr('checked'));
}
});