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.Dom
Provides methods to collect and filter DOM elements.
Defined in: Jelo.Dom.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
Jelo.Dom.ancestor(selector, element)
Selects the nearest parent element which matches a given selector.
|
| <static> |
Jelo.Dom.destroy(node)
Attempts to remove one or more elements from the page.
|
| <static> |
Jelo.Dom.filter(selector, superset)
Reduces a set of DOM nodes to those that also match the given CSS selector.
|
| <static> |
Jelo.Dom.fromString(html)
Converts HTML code to actual DOM elements.
|
| <static> |
Jelo.Dom.getAttribute(el, attr)
|
| <static> |
Jelo.Dom.is(el, selector)
|
| <static> |
Jelo.Dom.select(selector, context, results)
Selects the FIRST instance of a matching element.
|
| <static> |
Jelo.Dom.selectAll(selector, context, results)
Selects a group of elements that match a given CSS selector.
|
Method Detail
<static>
{HTMLElement}
Jelo.Dom.ancestor(selector, element)
Selects the nearest parent element which matches a given selector.
- Parameters:
- {String} selector
- The CSS selector or xpath query.
- {HTMLElement} element
- The "child" or starting element. This element is not tested.
- Returns:
- {HTMLElement} The first ancestor which matches the supplied selector, or null if not found.
<static>
Jelo.Dom.destroy(node)
Attempts to remove one or more elements from the page.
- Parameters:
- {HTMLElement|Array} node
- One or more elements to attempt to remove.
<static>
Jelo.Dom.filter(selector, superset)
Reduces a set of DOM nodes to those that also match the given CSS selector. The selector can be a full
selector (for example, "div > span.foo"), or a fragment or simple selector (for example, "div").
- Parameters:
- {String} selector
- The CSS selector or xpath query.
- {Array} superset Optional
- The set of elements to filter.
<static>
{Node}
Jelo.Dom.fromString(html)
Converts HTML code to actual DOM elements.
- Parameters:
- {String} html
- The HTML to convert to DOM nodes.
- Returns:
- {Node} A DocumentFragment object containing the specified nodes.
<static>
{String|Array}
Jelo.Dom.getAttribute(el, attr)
- Parameters:
- {HTMLElement|Array} el
- One or more elements to examine.
- {String} attr
- What attribute to examine.
- Returns:
- {String|Array} If
elis an HTMLElement, this returns the value of the supplied attribute. Ifelis an Array, this returns an array of attribute values.
<static>
{Boolean}
Jelo.Dom.is(el, selector)
- Parameters:
- {HTMLElement|Array} el
- One or more elements to examine.
- {String} selector
- Any valid CSS selector to match against.
- Returns:
- {Boolean} True if the supplied element matches the supplied selector.
<static>
{Node}
Jelo.Dom.select(selector, context, results)
Selects the FIRST instance of a matching element.
- Parameters:
- {String} selector
- The CSS selector or xpath query.
- {Node} context Optional, Default: document
- The root node within which to conduct this search.
- {Array} results Optional
- The collection returned from this function.
- Returns:
- {Node}
<static>
{Array}
Jelo.Dom.selectAll(selector, context, results)
Selects a group of elements that match a given CSS selector.
- Parameters:
- {String} selector
- The CSS selector or xpath query.
- {Node} context Optional, Default: document
- The root node within which to conduct this search.
- {Array} results Optional
- The collection returned from this function.
- Returns:
- {Array}
- 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)
