CheckboxGroup 0.1

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.



Details

Author
Amitay Horwitz
Current version
0.1
GitHub
amitayh/CheckboxGroup
Downloads
2329
Category
Forms
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_: core/1.3.1: '*'

How to use

Syntax

new CheckboxGroup(master, slaves);

Arguments

  1. master - (string) A string of the id for an Element, (element) Element reference - the master checkbox
  2. slaves - (string) A CSS selector, (elements), (collection) or (array) An enumerable list of elements - slaves checkboxes

Events

  • masterClick - (function) callback to execute when the master checkbox is checked / unchecked.
  • slaveClick - (function) callback to execute when a slave checkbox is checked / unchecked.

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus