Object: sapphire.style |
Description
Manipulates CSS classes.
File
WEB-CORE\scripts\sapphirecore.js
Properties
None.
setClassElement |
Functionality
Sets a CSS property within a CSS class.
Parameters
Parameter | Type | Description |
sTheId | String | Id of the CSS. |
sTheRule | String | Name of the CSS rule/class. |
sTheElement | String | Element in the CSS rule/class. |
sTheValue | String | Value to set for the element. |
Returns
String.
getClassElement |
Functionality
Gets a value from a CSS element in a CSS class.
Parameters
Parameter | Type | Description |
sTheId | String | Id of the CSS. |
sTheRule | String | Name of the CSS rule/class. |
sTheElement | String | Element in the CSS rule/class. |
Returns
String.
getstyleSheet |
Functionality
Gets a style sheet element.
Parameters
Parameter | Type | Description |
sTheId | String | Id of the CSS. |
oDoc | Object | Document object (defaults to current document). |
Returns
Object.
createstyleSheet |
Functionality
Creates a style sheet element.
Parameters
Parameter | Type | Description |
sTheId | String | Id of the new CSS. |
oDoc | Object | Document object (defaults to current document). |
Returns
Object.
addRule |
Functionality
Creates/edits a style sheet rule in a style sheet element. Returns the new rules index.
Parameters
Parameter | Type | Description |
sTheId | String | Id of the CSS. |
sTheRule | String | Name of the CSS rule (such as #arule or DIV). |
sstyle | String | Content for the rule (such as background-color:red). |
oDoc | Object | Document object (defaults to current document). |
Returns
Integer.
getRuleIndex |
Functionality
Gets the index of a CSS rule in a style sheet element.
Parameters
Parameter | Type | Description |
sTheId | String | Id of the CSS. |
sTheRule | String | Name of the CSS rule (such as #arule or DIV). |
oDoc | Object | Document object (defaults to current document). |
Returns
Integer.
removeRule |
Functionality
Removes a CSS rule in a style sheet element.
Parameters
Parameter | Type | Description |
sTheId | String | Id of the CSS. |
sTheRule | String | Name of the CSS rule (such as #arule or DIV). |
oDoc | Object | Document object (defaults to current document). |
Returns
None.
setDisplay |
Functionality
Updates the display attribute of the style according to the element type.
Parameters
Parameter | Type | Description |
oEl | Object | The element to update the style for |
lShow | Boolean | Set to true to show the element and false to hide it. |
Returns
None.