Query only the direct children of an element with a provided selector
xtag.queryChildren(ELEMENT, SELECTOR)
xtag.queryChildren(ELEMENT, SELECTOR)
Argument | Type | Description |
---|---|---|
ELEMENT | DOM element reference | A reference to the DOM element you wish to query |
SELECTOR | String | The CSS selector string you would like to test for matches against the element's direct children. |
var arrayOfRedLinks = xtag.queryChildren(myElement, 'a.red');
// Finds all links with the class 'red'