Show:

Augment the YUI3 Selector with more util methods.

Constructor

Methods

button

(
  • node
)
Boolean

Checks if the node is a button element or contains type="button".

Parameters:

  • node Object

Returns:

Boolean:

checkbox

() Boolean

Checks if the node contains type="checkbox".

Returns:

Boolean:

checked

(
  • node
)
Boolean

Checks if the node is checked or not.

Parameters:

  • node Object

Returns:

Boolean:

disabled

(
  • node
)
Boolean

Checks if the node is disabled or not.

Parameters:

  • node Object

Returns:

Boolean:

empty

(
  • node
)
Boolean

Checks if the node is empty or not.

Parameters:

  • node Object

Returns:

Boolean:

enabled

(
  • node
)
Boolean

Checks if the node is enabled or not.

Parameters:

  • node Object

Returns:

Boolean:

file

() Boolean

Checks if the node contains type="file".

Returns:

Boolean:

header

(
  • node
)
Boolean

Checks if the node is a header (e.g. <h1>, <h2>, ...) or not.

Parameters:

  • node Object

Returns:

Boolean:

hidden

(
  • node
)
Boolean

Checks if the node is hidden or not.

Parameters:

  • node Object

Returns:

Boolean:

image

() Boolean

Checks if the node contains type="image".

Returns:

Boolean:

input

(
  • node
)
Boolean

Checks if the node is an input (e.g. <textarea>, <input>, ...) or not.

Parameters:

  • node Object

Returns:

Boolean:

parent

(
  • node
)
Boolean

Checks if the node contains a child or not.

Parameters:

  • node Object

Returns:

Boolean:

password

() Boolean

Checks if the node contains type="password".

Returns:

Boolean:

radio

() Boolean

Checks if the node contains type="radio".

Returns:

Boolean:

reset

() Boolean

Checks if the node contains type="reset".

Returns:

Boolean:

selected

(
  • node
)
Boolean

Checks if the node is selected or not.

Parameters:

  • node Object

Returns:

Boolean:

submit

() Boolean

Checks if the node contains type="submit".

Returns:

Boolean:

text

() Boolean

Checks if the node contains type="text".

Returns:

Boolean:

visible

(
  • node
)
Boolean

Checks if the node is visible or not.

Parameters:

  • node Object

Returns:

Boolean:

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