JSFiddle - React, Tailwind, and code Playground
by Littlebob
HTML
<table>
<tr>
<td>
<input type="checkbox" name="something" value="0"/>
</td>
</tr>
</table>
CSS
td {
background-color: #eee;
padding:20px;
cursor:pointer;
width:40px;
text-align: center;
}
JavaScript
$('td').click(function () {
// Toggle checkbox
$('input:checkbox', this).prop('checked', function (i, value) {
return !value;
});
});