A.Selector Class
Augment the YUI3 Selector with more util methods.
Constructor
A.Selector
()
Index
Methods
Methods
checkbox
()
Boolean
Checks if the node contains type="checkbox"
.
Returns:
checked
-
node
Checks if the node is checked or not.
Parameters:
-
node
Object
Returns:
disabled
-
node
Checks if the node is disabled or not.
Parameters:
-
node
Object
Returns:
empty
-
node
Checks if the node is empty or not.
Parameters:
-
node
Object
Returns:
enabled
-
node
Checks if the node is enabled or not.
Parameters:
-
node
Object
Returns:
file
()
Boolean
Checks if the node contains type="file"
.
Returns:
header
-
node
Checks if the node is a header (e.g. <h1>
, <h2>
, ...) or not.
Parameters:
-
node
Object
Returns:
image
()
Boolean
Checks if the node contains type="image"
.
Returns:
input
-
node
Checks if the node is an input (e.g. <textarea>
, <input>
, ...) or not.
Parameters:
-
node
Object
Returns:
parent
-
node
Checks if the node contains a child or not.
Parameters:
-
node
Object
Returns:
password
()
Boolean
Checks if the node contains type="password"
.
Returns:
radio
()
Boolean
Checks if the node contains type="radio"
.
Returns:
reset
()
Boolean
Checks if the node contains type="reset"
.
Returns:
selected
-
node
Checks if the node is selected or not.
Parameters:
-
node
Object
Returns:
submit
()
Boolean
Checks if the node contains type="submit"
.
Returns:
text
()
Boolean
Checks if the node contains type="text"
.
Returns:
visible
-
node
Checks if the node is visible or not.
Parameters:
-
node
Object
Returns:
Properties
operators
Object
List of operators and corresponding boolean functions. These functions are passed the attribute and the current node's value of the attribute.
shorthand
Object
Mapping of shorthand tokens to corresponding attribute selector