JSFiddle - React, Tailwind, and code Playground
HTML
<form id="new_user_form">
<table id="mytb" class="table table-hover table-condensed">
<thead>
<tr>
<th style="width: 25%;"></th>
</tr>
</thead>
<tbody>
<tr>
<td>Row 1</td>
<td>
<input type="checkbox" value="1" />
</td>
<td>
<input type="checkbox" value="1" />
</td>
</tr>
<tr>
<td>Row 2</td>
<td class="vcenter">
<input type="checkbox" value="2" />
</td>
<td class="vcenter">
<input type="checkbox" value="2" />
</td>
</tr>
<tr></tr>
</tbody>
</table>
</form>
JavaScript
$('input:checkbox').change(function () {
var chk = $(this)
if (chk.is(':checked')) {
chk.parents('td').siblings('td').find('input:checkbox').prop('checked', true);
} else {
chk.parents('td').siblings('td').find('input:checkbox').prop('checked', false);
}
});