Selector Class
Provides support for using CSS selectors to query the DOM
Methods
ancestor
-
element -
selector -
testSelf
A convenience function to emulate Y.Node's aNode.ancestor(selector).
Parameters:
-
elementHTMLElementAn HTMLElement to start the query from.
-
selectorStringThe CSS selector to test the node against.
-
testSelfBooleanoptional Whether or not to include the element in the scan
Returns:
query
-
selector -
root -
firstOnly
Retrieves a set of nodes based on a given CSS selector.
Parameters:
-
selectorStringThe CSS Selector to test the node against.
-
rootHTMLElementoptional An HTMLElement to start the query from. Defaults to Y.config.doc
-
firstOnlyBooleanoptional Whether or not to return only the first match.
Returns:
setHeight
-
element -
size
Sets the height of the element to the given size, regardless of box model, border, padding, etc.
Parameters:
-
elementHTMLElementThe DOM element.
-
sizeString | NumberThe pixel height to size to
setWidth
-
element -
size
Sets the width of the element to the given size, regardless of box model, border, padding, etc.
Parameters:
-
elementHTMLElementThe DOM element.
-
sizeString | NumberThe pixel height to size to
