Range progress component.
Classes
Methods
(static) .create(formItem, contextopt, progressRequired, associatedRequired) → {RangeProgress}
Creates and registers a rangeAction.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
formItem |
Node | the form element | ||
context |
Node |
<optional> |
document | context to limit the selector |
progressRequired |
Boolean | true if JavaScript styling is required | ||
associatedRequired |
Boolean | true if the range has an associated input |
Returns:
- the RangeProgress object
- Type
- RangeProgress
Example
UCASDesignFramework.rangeAction.create($myFormItem)
(static) .destroy(formItem)
Parameters:
Name | Type | Description |
---|---|---|
formItem |
Node | the form element |
Example
UCASDesignFramework.rangeAction.destroy($myFormItem)
(static) .destroyAll(contextopt)
Destroy all styled range inputs.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
context |
Node |
<optional> |
document | context to limit the selector |
(static) .init(contextopt, selectoropt) → {Boolean}
Initialises any form items it finds that are of type "range" to:
- Allow the background before and after the thumb to be different colours.
Only needed for webkit browsers as Firefox and IE have their own
prefixed pseudo elements to handle this.
- Update any associated inputs with the current range value.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
context |
Node |
<optional> |
document | context to limit the selector |
selector |
String |
<optional> |
input[type="range"] | a valid CSS selector for the range input |
Returns:
- true for success
- Type
- Boolean
Example
UCASDesignFramework.rangeAction.init()