Namespace JSCALC
Defined in: calc-1.1.js.
Constructor Attributes | Constructor Name and Description |
---|---|
The JSCALC "namespace" / global object.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
JSCALC.css
Specifies the CSS file location.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
JSCALC.get(container)
Gets the Calculator object associated with the calculator contained in
the specified element.
|
<static> |
JSCALC.getCalcs()
Gets the Calculator objects for all the calculators on the page.
|
<static> |
JSCALC.init(elem)
Creates calculators.
|
<static> |
JSCALC.removeAll()
Removes all calculators.
|
Field Detail
<static>
JSCALC.css
Specifies the CSS file location. By default, this property is set
automatically the first time JSCALC.init() is called. Set this property
before calling JSCALC.init() to override the automatic value.
Method Detail
<static>
{Object}
JSCALC.get(container)
Gets the Calculator object associated with the calculator contained in
the specified element.
- Parameters:
- {Element} container
- the element containing the calculator
- Returns:
- {Object} the Calculator object or false if none exists
<static>
{Array}
JSCALC.getCalcs()
Gets the Calculator objects for all the calculators on the page.
- Returns:
- {Array} an array of Calculator objects
<static>
{Object|Array}
JSCALC.init(elem)
Creates calculators.
- Parameters:
- {String|Element} elem
- (optional) the element in which to create the calculator
- Returns:
- {Object|Array} If an argument is specified, the Calculator object or false is returned. If no (or invalid) arguments are specified, an array of Calculator objects or an empty array is returned.
<static>
JSCALC.removeAll()
Removes all calculators.