Namespace BTM.Form.Checkbox
Form Checkbox functionality
Defined in: form.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
BTM.Form.Checkbox.check(element)
Set a checkbox to checked
|
| <static> |
BTM.Form.Checkbox.initSelectAll(element, selector, context)
Add a "Select All" handler to a checkbox
|
| <static> |
BTM.Form.Checkbox.isChecked(element)
Check if a checkbox is checked
|
| <static> |
BTM.Form.Checkbox.selectAll(element, selector, context)
Toggle multiple checkboxes to match the state of a single checkbox
|
| <static> |
BTM.Form.Checkbox.toggle(element, force)
Toggle a checkbox (simulates the element being clicked
|
| <static> |
BTM.Form.Checkbox.unCheck(element)
Set a checkbox to unchecked
|
Method Detail
<static>
{HTMLElement}
BTM.Form.Checkbox.check(element)
Set a checkbox to checked
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to the checkbox
- Returns:
- {HTMLElement} reference to the checkbox
<static>
BTM.Form.Checkbox.initSelectAll(element, selector, context)
Add a "Select All" handler to a checkbox
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to the "Select All" checkbox
- {String} selector
- the CSS selector string representing the elements to be checked/unchecked
- {HTMLElement|String} context
- element ID or element reference to the context in which to apply the selector when finding checkboxes
<static>
{Boolean}
BTM.Form.Checkbox.isChecked(element)
Check if a checkbox is checked
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to the checkbox
- Returns:
- {Boolean} the checked state of the element
<static>
BTM.Form.Checkbox.selectAll(element, selector, context)
Toggle multiple checkboxes to match the state of a single checkbox
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to the "Select All" checkbox
- {String} selector
- the CSS selector string representing the elements to be checked/unchecked
- {HTMLElement|String} context
- element ID or element reference to the context in which to apply the selector when finding checkboxes
<static>
{HTMLElement}
BTM.Form.Checkbox.toggle(element, force)
Toggle a checkbox (simulates the element being clicked
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to the checkbox
- {Boolean} force Optional, Default: false
- force the checkbox to be toggled, ignoring if it is disabled or not
- Returns:
- {HTMLElement} reference to the checkbox
<static>
{HTMLElement}
BTM.Form.Checkbox.unCheck(element)
Set a checkbox to unchecked
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to the checkbox
- Returns:
- {HTMLElement} reference to the checkbox