Creates a dependency between one checkbox (master) to one or more other checkboxes (slaves).
When a master is checked - all its slaves are checked as well.
When a master is unchecked - all its slaves are unchecked as well.
If one slave is unchecked - the master does not show checked until all slaves are checked.
How to use
#JS new CheckboxGroup(master, slaves);
- master - (string) A string of the id for an Element, (element) Element reference - the master checkbox
- slaves - (string) A CSS selector, (elements), (collection) or (array) An enumerable list of elements - slaves checkboxes
- masterClick - (function) callback to execute when the master checkbox is checked / unchecked.
- slaveClick - (function) callback to execute when a slave checkbox is checked / unchecked.