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:
-
element
HTMLElementAn HTMLElement to start the query from.
-
selector
StringThe CSS selector to test the node against.
-
testSelf
Booleanoptional 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:
-
selector
StringThe CSS Selector to test the node against.
-
root
HTMLElementoptional An HTMLElement to start the query from. Defaults to Y.config.doc
-
firstOnly
Booleanoptional 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:
-
element
HTMLElementThe DOM element.
-
size
String | 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:
-
element
HTMLElementThe DOM element.
-
size
String | NumberThe pixel height to size to