JSFiddle - React, Tailwind, and code Playground
by jfriend00
HTML
<div><input type="checkbox">Check me</div>
<div><input type="checkbox">Check me</div>
<div><input type="checkbox">Check me</div>
<div><input type="checkbox">Check me</div>
CSS
.checked {font-weight: bold;}
JavaScript
$("input[type='checkbox']").click(function() {
$(this).parent().toggleClass("checked", this.checked);
});