Checkall plugin, mostly used on tables/lists.
/*
:: Plugin File
src/js/sow.core/sow.checkall.js
:: Plugin Init
*/ $.SOW.core.checkall.init('.checkall');
<label class="form-checkbox form-checkbox-secondary d-block">
<input class="checkall" data-checkall-container="#item_list" type="checkbox" name="checkbox">
<i></i> Check All
</label>
<hr>
<div id="item_list">
<label class="form-checkbox form-checkbox-primary d-block">
<input type="checkbox" name="item_id[]" value="1">
<i></i> Item 1
</label>
<label class="form-checkbox form-checkbox-primary d-block">
<input type="checkbox" name="item_id[]" value="2">
<i></i> Item 2
</label>
<label class="form-checkbox form-checkbox-primary d-block">
<input type="checkbox" name="item_id[]" value="3">
<i></i> Item 3
</label>
</div>
<hr>
<label class="form-checkbox form-checkbox-secondary d-block">
<input class="checkall" data-checkall-container="#item_list" type="checkbox" name="checkbox">
<i></i> Check All
</label>