JSFiddle - React, Tailwind, and code Playground

by sushanth009

HTML

<input type="checkbox"  class="checkall"/>

<input type="checkbox" class="child" />
<input type="checkbox" class="child" />
<input type="checkbox" class="child" />
<input type="checkbox" class="child" />
<input type="checkbox" class="child" />

CSS

input[type="checkbox"]
{
    display:block;
}

JavaScript

$(function(){
    $('.checkall').on('click', function() {
        $('.child').prop('checked', this.checked)
    });
});