1.2.2 • Published 5 months ago
@saekitominaga/customelements-button-checkboxes-ctrl v1.2.2
Button to check / uncheck checkboxes group
Demo
Examples
<button type="button" is="x-checkboxes-ctrl"
data-course="check"
data-target-for="checkboxes1"
>Check all</button>
<span id="checkboxes1">
<label><input type="checkbox"/> 1</label>
<label><input type="checkbox"/> 2</label>
<label><input type="checkbox"/> 3</label>
</span>
<button type="button" is="x-checkboxes-ctrl"
data-course="check"
data-targets-class="checkbox2"
>Check all</button>
<span>
<label><input type="checkbox" class="checkbox2"/> 1</label>
<label><input type="checkbox" class="checkbox2"/> 2</label>
<label><input type="checkbox" class="checkbox2"/> 3</label>
</span>
<button type="button" is="x-checkboxes-ctrl"
data-course="check"
data-targets-name="checkbox3[]"
>Check all</button>
<span>
<label><input type="checkbox" name="checkbox3[]"/> 1</label>
<label><input type="checkbox" name="checkbox3[]"/> 2</label>
<label><input type="checkbox" name="checkbox3[]"/> 3</label>
</span>