JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tbody>
<tr>
<td>
<input class="myCheckBox" type="checkbox" value="true"></input>
</td>
</tr>
<tr>
<td>
<input class="myCheckBox" type="checkbox" value="true"></input>
</td>
</tr>
</tbody>
</table>
<button type="submit" id="confirmButton"> BUTTON </button>
JavaScript
$('tbody').click(function () {
$('tbody tr').each(function () {
if ($(this).find('.myCheckBox').prop('checked')) {
doEnableButton = true;
}
if (!doEnableButton) {
$('#confirmButton').prop('disabled', 'disabled')
}
else {
$('#confirmButton').removeAttr("disabled");
}
});
});