NodeList
(
)
(
)
void
addClass
(
className
)
className
<String>
the class name to add to the node's class attribute
Object
after
(
type
,
fn
,
context
)
type
<String>
The event being listened for
fn
<Function>
The handler to call when the event fires
context
<Object>
The context to call the handler with.
Default is the NodeList instance.
Object
void
append
(
)
void
detach
(
)
void
detachAll
(
)
void
each
(
fn
,
context
)
fn
<Function>
The function to apply. It receives 3 arguments:
the current node instance, the node's index, and the NodeList instance
context
<Object>
optional An optional context to apply the function with
Default context is the current Node instance
NodeList
even
(
)
NodeList
NodeList
filter
(
selector
)
selector
<String>
The selector to filter against
NodeList
void
get
(
)
string
getAttribute
(
name
)
name
<string>
The attribute name
string
Array
getComputedStyle
(
attr
)
attr
<String>
The style attribute to retrieve.
Array
Array
getStyle
(
attr
)
attr
<String>
The style attribute to retrieve.
Array
Array
hasClass
(
className
)
className
<String>
the class name to search for
Array
Int
indexOf
(
node
)
node
<Y.Node || DOMNode>
the node to search for
Int
void
insert
(
)
Boolean
isEmpty
(
)
Boolean
Node
item
(
index
)
index
<Number>
The index of the target Node.
Node
NodeList
modulus
(
n
,
r
)
n
<Int>
The offset to use (return every nth node)
r
<Int>
An optional remainder to use with the modulus operation (defaults to zero)
NodeList
static
Array
NodeList.getDOMNodes
(
node
)
node
<Y.NodeList>
The NodeList instance
Array
NodeList
odd
(
)
NodeList
Object
on
(
type
,
fn
,
context
)
type
<String>
The event being listened for
fn
<Function>
The handler to call when the event fires
context
<Object>
The context to call the handler with.
Default is the NodeList instance.
Object
void
prepend
(
)
void
refresh
(
)
void
remove
(
)
void
removeAttribute
(
)
void
removeClass
(
className
)
className
<String>
the class name to remove from the node's class attribute
void
replaceClass
(
oldClassName
,
newClassName
)
oldClassName
<String>
the class name to be replaced
newClassName
<String>
the class name that will be replacing the old class name
void
set
(
)
void
setAttribute
(
name
,
value
)
name
<string>
The attribute name
value
<string>
The value to set
void
setContent
(
)
void
setStyle
(
attr
,
val
)
attr
<String>
The style attribute to set.
val
<String|Number>
The value.
void
setStyles
(
hash
)
hash
<Object>
An object literal of property:value pairs.
Int
size
(
)
Int
Boolean
some
(
fn
,
context
)
fn
<Function>
The function to apply. It receives 3 arguments:
the current node instance, the node's index, and the NodeList instance
context
<Object>
optional An optional context to execute the function from.
Default context is the current Node instance
Boolean
toFrag
(
)
void
toggleClass
(
className
)
className
<String>
the class name to be toggled