JSFiddle - React, Tailwind, and code Playground

by Ashish Kasama

HTML

<table>
      <thead>
        <tr>
        <th class="spacer_100 align_ctr tooltip_trigger">
            Change Status <input id='sample' type="checkbox" name="sample" />
        </th>
        </tr>
      </thead>
      <tbody>

          
          <tr>
          <td class="align_ctr" style="text-align: center">
           <input type="checkbox" name="current_status[]" value="1"/>
          </td>
          </tr>
          <tr>
          <td class="align_ctr" style="text-align: center">
           <input type="checkbox" name="current_status[]" value="1"/>
          </td>
          </tr>
          <tr>
          <td class="align_ctr" style="text-align: center">
           <input type="checkbox" name="current_status[]" value="1"/>
          </td>
          </tr>
          <tr>
          <td class="align_ctr" style="text-align: center">
           <input type="checkbox" name="current_status[]" value="1"/>
          </td>
          </tr>
          
      </tbody>
     </table>

JavaScript

$('#sample').click(function(){   
    $('input[type=checkbox]').not(this).attr('checked', this.checked);    
});