JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<thead>
<tr>
<th>Remove</th>
</tr>
</thead>
<tbody>
<tr class="row">
<td class="onoff"><input type="checkbox" name="something[]" checked="checked" /></td>
</tr>
<tr class="row">
<td class="onoff"><input type="checkbox" name="something[]" checked="checked" /></td>
</tr>
<tr class="row">
<td class="onoff"><input type="checkbox" name="something[]" checked="checked" /></td>
</tr>
</tbody>
</table>
CSS
table tbody tr {
cursor: pointer;
vertical-align: top;
}
table thead th, table .row td {
font-size: 1.1em;
padding: 10px;
}
table .row td {
text-align: center;
background: #eee;
}
table a {
font-size: 1em;
}
JavaScript
$(function() {
$("td.onoff").click(function() {
var objCheckbox = $(this).find("input[type=checkbox]");
if( objCheckbox.length >= 1 ) {
objCheckbox.prop("checked", !objCheckbox.prop("checked"));
}
});
});