JSFiddle - React, Tailwind, and code Playground

by Matt Ball

HTML

<script src="https://rawgithub.com/mjball/jQuery-CheckAll/master/jquery.checkall.js"></script>
<form action="#" id="myform"> 
    <fieldset>
        <div><label><input type="checkbox" id="checkall"/> Check all</label></div>
        <div><label><input type="checkbox"/> Checkbox</label></div>
        <div><label><input type="checkbox"/> Checkbox</label></div>
        <div><label><input type="checkbox"/> Checkbox</label></div>
        <div><label><input type="checkbox"/> Checkbox</label></div>
        <div><label><input type="checkbox"/> Checkbox</label></div>
    </fieldset>
</form>

JavaScript

$('#checkall').checkAll('#myform input:checkbox');