Classes
- API Home
- _global_
- Array
- Jelo
- Jelo.Ajax
- Jelo.Anim
- Jelo.Core
- Jelo.CSS
- Jelo.Dom
- Jelo.DragDrop
- Jelo.Env
- Jelo.Event
- Jelo.JSON
- Jelo.Widget
Namespace Jelo.CSS
Provides access to style and stylesheet functionality.
Defined in: Jelo.CSS.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
Jelo.CSS.addClass(el, cls)
|
| <static> |
Jelo.CSS.deleteRule(str, sheet)
|
| <static> |
Jelo.CSS.findPosition(The)
Finds the top and left positions of an element on the page.
|
| <static> |
Jelo.CSS.getRules(sheet)
|
| <static> |
Jelo.CSS.getRuleStyle(selector, sheet)
|
| <static> |
Jelo.CSS.getStyle(el, prop)
|
| <static> |
Jelo.CSS.getStylesheets()
|
| <static> |
Jelo.CSS.hasClass(el, cls)
|
| <static> |
Jelo.CSS.insertRule(selector, cssText, sheet, index)
|
| <static> |
Jelo.CSS.randomColor()
Generates a random hexidecimal color, including the hash symbol (e.g.
|
| <static> |
Jelo.CSS.removeClass(el, cls)
|
| <static> |
Jelo.CSS.setStyle(el, prop, val)
|
| <static> |
Jelo.CSS.toggleClass(el, cls)
|
Method Detail
<static>
Jelo.CSS.addClass(el, cls)
- Parameters:
- {HTMLElement|Array} el
- One or more elements to which to add a class.
- {String} cls
- The class name to add.
<static>
Jelo.CSS.deleteRule(str, sheet)
- Parameters:
- {String} str
- Which selector identifies the rule to remove. For example, "#navigation li a:hover"
- {Stylesheet} sheet Optional
- Which sheet to remove the rule from. Defaults to searching every stylesheet on the page.
<static>
{Array}
Jelo.CSS.findPosition(The)
Finds the top and left positions of an element on the page.
- Parameters:
- {HTMLElement} The
- element to inspect
- Returns:
- {Array} [left, top] calculated in pixels, output as Numbers.
<static>
{Array}
Jelo.CSS.getRules(sheet)
- Parameters:
- {StyleSheet|Array} sheet Optional
- A CSS StyleSheet object, or an array of StyleSheet objects. If none is supplied, sheet defaults to the complete list of stylesheets on the current page.
- Returns:
- {Array} The list of CSS rules contained in the supplied stylesheet.
<static>
Jelo.CSS.getRuleStyle(selector, sheet)
- Parameters:
- {String} selector
- Any valid CSS selector, such as "div" or "#navigation li a:hover"
- {StyleSheet} sheet Optional
- Which sheet to examine. Defaults to searching every stylesheet on the page.
<static>
{String|Array}
Jelo.CSS.getStyle(el, prop)
- Parameters:
- {HTMLElement|Array} el
- One or more elements to examine.
- {String|Array} prop
- Any CSS property to examine.
- Returns:
- {String|Array} If either supplied argument is an Array, this will return an Array of retrieved values. Otherwise, it will return a single style value as a String.
<static>
{Array}
Jelo.CSS.getStylesheets()
- Returns:
- {Array} The list of stylesheets on the current page.
<static>
{Boolean}
Jelo.CSS.hasClass(el, cls)
- Parameters:
- {HTMLElement|Array} el
- One or more elements to check.
- {String} cls
- A classname to check.
- Returns:
- {Boolean} True if the supplied element has the supplied class. If
elis an Array,hasClassreturns true only if every element in the supplied Array has the supplied class.
<static>
Jelo.CSS.insertRule(selector, cssText, sheet, index)
- Parameters:
- {String} selector
- Any valid CSS selector, for example "#navigation li a:hover"
- {String} cssText
- Any valid CSS text, for example "background: #dfd; color: #000;"
- {Stylesheet} sheet Optional
- Which stylesheet to insert the rule into. Defaults to the last sheet on the page.
- {Number} index Optional
- Which rule index to insert the rule after. Defaults to inserting after the last rule.
<static>
{String}
Jelo.CSS.randomColor()
Generates a random hexidecimal color, including the hash symbol (e.g. #5181ff)
- Returns:
- {String} A "CSS-formatted" color.
<static>
Jelo.CSS.removeClass(el, cls)
- Parameters:
- {HTMLElement|Array} el
- One or more elements from which to remove a class.
- {String} cls
- The class name to remove.
<static>
Jelo.CSS.setStyle(el, prop, val)
- Parameters:
- {HTMLElement|Array} el
- One or more elements to modify.
- {String|Array} prop
- One or more properties to set. If either
proporvalis an Array, BOTH must be an array. - {String|Array} val
- One or more values to set. If either
proporvalis an Array, BOTH must be an array.
<static>
Jelo.CSS.toggleClass(el, cls)
- Parameters:
- {HTMLElement|Array} el
- One or more elements to toggle.
- {String} cls
- The class name to add or remove.
- recent changes — (see all)
-
- Sep 14, 2010 — Simplified DragDrop.
- Jul 19, 2010 — Fixed typo preventing reliably aborting pending Ajax requests.
- Jun 17, 2010 — Fixed a conflict preventing Easing.SWINGOUT and Easing.SWINGBOTH from running simultaneously.
- Apr 22, 2010 — Added Array support to CSS.toggleClass.
- random jelo shots — (see all)
