JSFiddle - React, Tailwind, and code Playground

by ds345

HTML

<table id="checkTable">
    <tr><td><input type="checkbox" id="CheckAll">Check All</input></td></tr>
    <tr><td><input type="checkbox">Check 1</input></td></tr>
    <tr><td><input type="checkbox">Check 2</input></td></tr>
    <tr><td><input type="checkbox">Check 3</input></td></tr>
</table>

JavaScript

$('#CheckAll').on('change', function (event) {
    $('table#checkTable input[type=checkbox]').prop('checked', $(this).prop('checked'));
});