<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>API: node NodeList (YUI Library)</title>
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
<link rel="stylesheet" type="text/css" href="assets/api.css" />
<script type="text/javascript" src="assets/api-js"></script>
<script type="text/javascript" src="assets/ac-js"></script>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
<h3>node <span class="subtitle">3.0.0</span></h3>
<a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a>
> <a href="./module_node.html" title="node">node</a>
> NodeList
<form onsubmit="return false">
<div id="propertysearch">
Search: <input autocomplete="off" id="searchinput" />
<div id="searchresults">
</div>
</div>
</form>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
<fieldset>
<legend>Filters</legend>
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
</fieldset>
</form>
<h2>
Class <b property="yui:name">NodeList</b>
<span class="extends">
</span>
</h2>
<!-- class tree goes here -->
<div class="summary description" property="yui:description">
The NodeList class provides a wrapper for manipulating DOM NodeLists.
NodeList properties can be accessed via the set/get methods.
Use Y.all() to retrieve NodeList instances.
</div>
<div class="section constructor details" rel="yui:constructor" resource="#constructor">
<h3 id="constructor">Constructor</h3>
<div class="content">
<div class="detail">
<strong property="yui:name">NodeList</strong>
<code>
(
)
</code>
<div class="description">
</div>
</div>
</div>
</div>
<div rel="yui:properties" resource="#properties">
</div>
<div rel="yui:methods" resource="#methods">
<div class="section method details">
<h3 id="methods">Methods</h3>
<div class="content">
<div class="" rel="yui:method" resource="#method_addClass">
<h4>
<a name="method_addClass">addClass</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">addClass</strong>
(
className
)
</code>
<div class="description" property="yui:description">
Adds a class name to each node.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">className</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> the class name to add to the node's class attribute</span>
</dd>
</dl>
<div class="chainable">
<strong>Chainable:</strong> This method is chainable.
</div>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_after">
<h4>
<a name="method_after">after</a></h4>
<div class="detail" >
<code>
Object
<strong property="yui:name">after</strong>
(
type
,
fn
,
context
)
</code>
<div class="description" property="yui:description">
Applies an event listener to each Node bound to the NodeList.
The handler is called only after all on() handlers are called
and the event is not prevented.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">type</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> The event being listened for</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">fn</span>
<<span property="yui:type">Function</span>>
</code>
<span property="yui:description"> The handler to call when the event fires</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">context</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> The context to call the handler with.
Default is the NodeList instance.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Object
</code></dt>
<dd property="yui:returnInfo">Returns an event handle that can later be use to detach().</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_append">
<h4>
<a name="method_append">append</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">append</strong>
(
)
</code>
<div class="description" property="yui:description">
Called on each Node instance
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_detach">
<h4>
<a name="method_detach">detach</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">detach</strong>
(
)
</code>
<div class="description" property="yui:description">
Called on each Node instance
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_detachAll">
<h4>
<a name="method_detachAll">detachAll</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">detachAll</strong>
(
)
</code>
<div class="description" property="yui:description">
Called on each Node instance
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_each">
<h4>
<a name="method_each">each</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">each</strong>
(
fn
,
context
)
</code>
<div class="description" property="yui:description">
Applies the given function to each Node in the NodeList.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">fn</span>
<<span property="yui:type">Function</span>>
</code>
<span property="yui:description"> The function to apply. It receives 3 arguments:
the current node instance, the node's index, and the NodeList instance</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">context</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> optional An optional context to apply the function with
Default context is the current Node instance</span>
</dd>
</dl>
<div class="chainable">
<strong>Chainable:</strong> This method is chainable.
</div>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_even">
<h4>
<a name="method_even">even</a></h4>
<div class="detail" >
<code>
NodeList
<strong property="yui:name">even</strong>
(
)
</code>
<div class="description" property="yui:description">
Creates a new NodeList containing all nodes at even indices
(zero-based index), including zero.
</div>
<div class="description">
<dl>
<dt>Returns:
<code property="yui:return">
NodeList
</code></dt>
<dd property="yui:returnInfo">NodeList containing the updated collection</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_filter">
<h4>
<a name="method_filter">filter</a></h4>
<div class="detail" >
<code>
NodeList
<strong property="yui:name">filter</strong>
(
selector
)
</code>
<div class="description" property="yui:description">
Filters the NodeList instance down to only nodes matching the given selector.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">selector</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> The selector to filter against</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
NodeList
</code></dt>
<dd property="yui:returnInfo">NodeList containing the updated collection</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_get">
<h4>
<a name="method_get">get</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">get</strong>
(
)
</code>
<div class="description" property="yui:description">
Called on each Node instance
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_getAttribute">
<h4>
<a name="method_getAttribute">getAttribute</a></h4>
<div class="detail" >
<code>
string
<strong property="yui:name">getAttribute</strong>
(
name
)
</code>
<div class="description" property="yui:description">
Allows getting attributes on DOM nodes, normalizing in some cases.
This passes through to the DOM node, allowing for custom attributes.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">name</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> The attribute name</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
string
</code></dt>
<dd property="yui:returnInfo">The attribute value</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_getComputedStyle">
<h4>
<a name="method_getComputedStyle">getComputedStyle</a></h4>
<div class="detail" >
<code>
Array
<strong property="yui:name">getComputedStyle</strong>
(
attr
)
</code>
<div class="description" property="yui:description">
Returns an array of the computed value for each node.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">attr</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> The style attribute to retrieve.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Array
</code></dt>
<dd property="yui:returnInfo">The computed values for each node.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_getStyle">
<h4>
<a name="method_getStyle">getStyle</a></h4>
<div class="detail" >
<code>
Array
<strong property="yui:name">getStyle</strong>
(
attr
)
</code>
<div class="description" property="yui:description">
Returns an array of values for each node.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">attr</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> The style attribute to retrieve.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Array
</code></dt>
<dd property="yui:returnInfo">The current values of the style property for the element.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_hasClass">
<h4>
<a name="method_hasClass">hasClass</a></h4>
<div class="detail" >
<code>
Array
<strong property="yui:name">hasClass</strong>
(
className
)
</code>
<div class="description" property="yui:description">
Determines whether each node has the given className.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">className</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> the class name to search for</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Array
</code></dt>
<dd property="yui:returnInfo">An array of booleans for each node bound to the NodeList.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_indexOf">
<h4>
<a name="method_indexOf">indexOf</a></h4>
<div class="detail" >
<code>
Int
<strong property="yui:name">indexOf</strong>
(
node
)
</code>
<div class="description" property="yui:description">
Returns the index of the node in the NodeList instance
or -1 if the node isn't found.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">node</span>
<<span property="yui:type">Y.Node || DOMNode</span>>
</code>
<span property="yui:description"> the node to search for</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Int
</code></dt>
<dd property="yui:returnInfo">the index of the node value or -1 if not found</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_insert">
<h4>
<a name="method_insert">insert</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">insert</strong>
(
)
</code>
<div class="description" property="yui:description">
Called on each Node instance
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_item">
<h4>
<a name="method_item">item</a></h4>
<div class="detail" >
<code>
Node
<strong property="yui:name">item</strong>
(
index
)
</code>
<div class="description" property="yui:description">
Retrieves the Node instance at the given index.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">index</span>
<<span property="yui:type">Number</span>>
</code>
<span property="yui:description"> The index of the target Node.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Node
</code></dt>
<dd property="yui:returnInfo">The Node instance at the given index.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_modulus">
<h4>
<a name="method_modulus">modulus</a></h4>
<div class="detail" >
<code>
NodeList
<strong property="yui:name">modulus</strong>
(
n
,
r
)
</code>
<div class="description" property="yui:description">
Creates a new NodeList containing all nodes at every n indices, where
remainder n % index equals r.
(zero-based index).
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">n</span>
<<span property="yui:type">Int</span>>
</code>
<span property="yui:description"> The offset to use (return every nth node)</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">r</span>
<<span property="yui:type">Int</span>>
</code>
<span property="yui:description"> An optional remainder to use with the modulus operation (defaults to zero)</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
NodeList
</code></dt>
<dd property="yui:returnInfo">NodeList containing the updated collection</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_NodeList.getDOMNodes">
<h4>
<a name="method_NodeList.getDOMNodes">NodeList.getDOMNodes</a></h4>
<div class="detail" >
<code>
static
Array
<strong property="yui:name">NodeList.getDOMNodes</strong>
(
node
)
</code>
<div class="description" property="yui:description">
Retrieves the DOM nodes bound to a NodeList instance
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">node</span>
<<span property="yui:type">Y.NodeList</span>>
</code>
<span property="yui:description"> The NodeList instance</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Array
</code></dt>
<dd property="yui:returnInfo">The array of DOM nodes bound to the NodeList</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_odd">
<h4>
<a name="method_odd">odd</a></h4>
<div class="detail" >
<code>
NodeList
<strong property="yui:name">odd</strong>
(
)
</code>
<div class="description" property="yui:description">
Creates a new NodeList containing all nodes at odd indices
(zero-based index).
</div>
<div class="description">
<dl>
<dt>Returns:
<code property="yui:return">
NodeList
</code></dt>
<dd property="yui:returnInfo">NodeList containing the updated collection</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_on">
<h4>
<a name="method_on">on</a></h4>
<div class="detail" >
<code>
Object
<strong property="yui:name">on</strong>
(
type
,
fn
,
context
)
</code>
<div class="description" property="yui:description">
Applies an event listener to each Node bound to the NodeList.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">type</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> The event being listened for</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">fn</span>
<<span property="yui:type">Function</span>>
</code>
<span property="yui:description"> The handler to call when the event fires</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">context</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> The context to call the handler with.
Default is the NodeList instance.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Object
</code></dt>
<dd property="yui:returnInfo">Returns an event handle that can later be use to detach().</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_prepend">
<h4>
<a name="method_prepend">prepend</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">prepend</strong>
(
)
</code>
<div class="description" property="yui:description">
Called on each Node instance
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_refresh">
<h4>
<a name="method_refresh">refresh</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">refresh</strong>
(
)
</code>
<div class="description" property="yui:description">
Reruns the initial query, when created using a selector query
</div>
<div class="description">
<div class="chainable">
<strong>Chainable:</strong> This method is chainable.
</div>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_remove">
<h4>
<a name="method_remove">remove</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">remove</strong>
(
)
</code>
<div class="description" property="yui:description">
Called on each Node instance
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_removeClass">
<h4>
<a name="method_removeClass">removeClass</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">removeClass</strong>
(
className
)
</code>
<div class="description" property="yui:description">
Removes a class name from each node.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">className</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> the class name to remove from the node's class attribute</span>
</dd>
</dl>
<div class="chainable">
<strong>Chainable:</strong> This method is chainable.
</div>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_replaceClass">
<h4>
<a name="method_replaceClass">replaceClass</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">replaceClass</strong>
(
oldClassName
,
newClassName
)
</code>
<div class="description" property="yui:description">
Replace a class with another class for each node.
If no oldClassName is present, the newClassName is simply added.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">oldClassName</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> the class name to be replaced</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">newClassName</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> the class name that will be replacing the old class name</span>
</dd>
</dl>
<div class="chainable">
<strong>Chainable:</strong> This method is chainable.
</div>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_set">
<h4>
<a name="method_set">set</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">set</strong>
(
)
</code>
<div class="description" property="yui:description">
Called on each Node instance
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_setAttribute">
<h4>
<a name="method_setAttribute">setAttribute</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">setAttribute</strong>
(
name
,
value
)
</code>
<div class="description" property="yui:description">
Allows setting attributes on DOM nodes, normalizing in some cases.
This passes through to the DOM node, allowing for custom attributes.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">name</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> The attribute name</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">value</span>
<<span property="yui:type">string</span>>
</code>
<span property="yui:description"> The value to set</span>
</dd>
</dl>
<div class="chainable">
<strong>Chainable:</strong> This method is chainable.
</div>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_setContent">
<h4>
<a name="method_setContent">setContent</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">setContent</strong>
(
)
</code>
<div class="description" property="yui:description">
Called on each Node instance
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_setStyle">
<h4>
<a name="method_setStyle">setStyle</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">setStyle</strong>
(
attr
,
val
)
</code>
<div class="description" property="yui:description">
Sets a style property on each node.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">attr</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> The style attribute to set.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">val</span>
<<span property="yui:type">String|Number</span>>
</code>
<span property="yui:description"> The value.</span>
</dd>
</dl>
<div class="chainable">
<strong>Chainable:</strong> This method is chainable.
</div>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_setStyles">
<h4>
<a name="method_setStyles">setStyles</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">setStyles</strong>
(
hash
)
</code>
<div class="description" property="yui:description">
Sets multiple style properties on each node.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">hash</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> An object literal of property:value pairs.</span>
</dd>
</dl>
<div class="chainable">
<strong>Chainable:</strong> This method is chainable.
</div>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_size">
<h4>
<a name="method_size">size</a></h4>
<div class="detail" >
<code>
Int
<strong property="yui:name">size</strong>
(
)
</code>
<div class="description" property="yui:description">
Returns the current number of items in the NodeList.
</div>
<div class="description">
<dl>
<dt>Returns:
<code property="yui:return">
Int
</code></dt>
<dd property="yui:returnInfo">The number of items in the NodeList.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_some">
<h4>
<a name="method_some">some</a></h4>
<div class="detail" >
<code>
Boolean
<strong property="yui:name">some</strong>
(
fn
,
context
)
</code>
<div class="description" property="yui:description">
Executes the function once for each node until a true value is returned.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">fn</span>
<<span property="yui:type">Function</span>>
</code>
<span property="yui:description"> The function to apply. It receives 3 arguments:
the current node instance, the node's index, and the NodeList instance</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">context</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> optional An optional context to execute the function from.
Default context is the current Node instance</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Boolean
</code></dt>
<dd property="yui:returnInfo">Whether or not the function returned true for any node.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_toDocFrag">
<h4>
<a name="method_toDocFrag">toDocFrag</a></h4>
<div class="detail" >
<code>
<strong property="yui:name">toDocFrag</strong>
(
)
</code>
<div class="description" property="yui:description">
Creates a documenFragment from the nodes bound to the NodeList instance
</div>
<div class="description">
<dl>
<dt>Returns:
<code property="yui:return">
</code></dt>
<dd property="yui:returnInfo">Node a Node instance bound to the documentFragment</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_toggleClass">
<h4>
<a name="method_toggleClass">toggleClass</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">toggleClass</strong>
(
className
)
</code>
<div class="description" property="yui:description">
If the className exists on the node it is removed, if it doesn't exist it is added.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">className</span>
<<span property="yui:type">String</span>>
</code>
<span property="yui:description"> the class name to be toggled</span>
</dd>
</dl>
<div class="chainable">
<strong>Chainable:</strong> This method is chainable.
</div>
</div>
</div>
<hr />
</div>
</div>
</div>
</div>
<div rel="yui:events" resource="#events">
</div>
<div rel="yui:attributes" resource="#configattributes">
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div id="moduleList" class="module">
<h4>Modules</h4>
<ul class="content">
<li class=""><a href="module_anim.html" title="anim">anim</a></li>
<li class=""><a href="module_async-queue.html" title="async-queue">async-queue</a></li>
<li class=""><a href="module_attribute.html" title="attribute">attribute</a></li>
<li class=""><a href="module_base.html" title="base">base</a></li>
<li class=""><a href="module_cache.html" title="cache">cache</a></li>
<li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li>
<li class=""><a href="module_collection.html" title="collection">collection</a></li>
<li class=""><a href="module_console.html" title="console">console</a></li>
<li class=""><a href="module_console-filters.html" title="console-filters">console-filters</a></li>
<li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
<li class=""><a href="module_dataschema.html" title="dataschema">dataschema</a></li>
<li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
<li class=""><a href="module_datatype.html" title="datatype">datatype</a></li>
<li class=""><a href="module_dd.html" title="dd">dd</a></li>
<li class=""><a href="module_dom.html" title="dom">dom</a></li>
<li class=""><a href="module_dump.html" title="dump">dump</a></li>
<li class=""><a href="module_event.html" title="event">event</a></li>
<li class=""><a href="module_event-custom.html" title="event-custom">event-custom</a></li>
<li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
<li class=""><a href="module_history.html" title="history">history</a></li>
<li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
<li class=""><a href="module_io.html" title="io">io</a></li>
<li class=""><a href="module_json.html" title="json">json</a></li>
<li class="selected"><a href="module_node.html" title="node">node</a></li>
<li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li>
<li class=""><a href="module_node-menunav.html" title="node-menunav">node-menunav</a></li>
<li class=""><a href="module_oop.html" title="oop">oop</a></li>
<li class=""><a href="module_overlay.html" title="overlay">overlay</a></li>
<li class=""><a href="module_plugin.html" title="plugin">plugin</a></li>
<li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
<li class=""><a href="module_queue-promote.html" title="queue-promote">queue-promote</a></li>
<li class=""><a href="module_slider.html" title="slider">slider</a></li>
<li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
<li class=""><a href="module_substitute.html" title="substitute">substitute</a></li>
<li class=""><a href="module_test.html" title="test">test</a></li>
<li class=""><a href="module_widget.html" title="widget">widget</a></li>
<li class=""><a href="module_widget-position.html" title="widget-position">widget-position</a></li>
<li class=""><a href="module_widget-position-ext.html" title="widget-position-ext">widget-position-ext</a></li>
<li class=""><a href="module_widget-stack.html" title="widget-stack">widget-stack</a></li>
<li class=""><a href="module_widget-stdmod.html" title="widget-stdmod">widget-stdmod</a></li>
<li class=""><a href="module_yui.html" title="yui">yui</a></li>
</ul>
</div>
<div id="classList" class="module">
<h4>Classes</h4>
<ul class="content">
<li class=""><a href="Node.html" title="Node">Node</a></li>
<li class="selected"><a href="NodeList.html" title="NodeList">NodeList</a></li>
</ul>
</div>
<div id="fileList" class="module">
<h4>Files</h4>
<ul class="content">
<li class=""><a href="node-class.js.html" title="node-class.js">node-class.js</a></li>
<li class=""><a href="node-event-delegate.js.html" title="node-event-delegate.js">node-event-delegate.js</a></li>
<li class=""><a href="node-event-simulate.js.html" title="node-event-simulate.js">node-event-simulate.js</a></li>
<li class=""><a href="node-ie.js.html" title="node-ie.js">node-ie.js</a></li>
<li class=""><a href="node-imports.js.html" title="node-imports.js">node-imports.js</a></li>
<li class=""><a href="node-pluginhost.js.html" title="node-pluginhost.js">node-pluginhost.js</a></li>
<li class=""><a href="node-region.js.html" title="node-region.js">node-region.js</a></li>
<li class=""><a href="node-screen.js.html" title="node-screen.js">node-screen.js</a></li>
<li class=""><a href="node-style.js.html" title="node-style.js">node-style.js</a></li>
<li class=""><a href="node.js.html" title="node.js">node.js</a></li>
<li class=""><a href="nodelist.js.html" title="nodelist.js">nodelist.js</a></li>
</ul>
</div>
<div id="methodsList" class="module">
<h4>Methods</h4>
<ul class="content">
<li class=""><a href="#method_addClass" title="addClass">addClass</a></li>
<li class=""><a href="#method_after" title="after">after</a></li>
<li class=""><a href="#method_append" title="append">append</a></li>
<li class=""><a href="#method_detach" title="detach">detach</a></li>
<li class=""><a href="#method_detachAll" title="detachAll">detachAll</a></li>
<li class=""><a href="#method_each" title="each">each</a></li>
<li class=""><a href="#method_even" title="even">even</a></li>
<li class=""><a href="#method_filter" title="filter">filter</a></li>
<li class=""><a href="#method_get" title="get">get</a></li>
<li class=""><a href="#method_getAttribute" title="getAttribute">getAttribute</a></li>
<li class=""><a href="#method_getComputedStyle" title="getComputedStyle">getComputedStyle</a></li>
<li class=""><a href="#method_getStyle" title="getStyle">getStyle</a></li>
<li class=""><a href="#method_hasClass" title="hasClass">hasClass</a></li>
<li class=""><a href="#method_indexOf" title="indexOf">indexOf</a></li>
<li class=""><a href="#method_insert" title="insert">insert</a></li>
<li class=""><a href="#method_item" title="item">item</a></li>
<li class=""><a href="#method_modulus" title="modulus">modulus</a></li>
<li class=""><a href="#method_NodeList.getDOMNodes" title="NodeList.getDOMNodes">NodeList.getDOMNodes</a></li>
<li class=""><a href="#method_odd" title="odd">odd</a></li>
<li class=""><a href="#method_on" title="on">on</a></li>
<li class=""><a href="#method_prepend" title="prepend">prepend</a></li>
<li class=""><a href="#method_refresh" title="refresh">refresh</a></li>
<li class=""><a href="#method_remove" title="remove">remove</a></li>
<li class=""><a href="#method_removeClass" title="removeClass">removeClass</a></li>
<li class=""><a href="#method_replaceClass" title="replaceClass">replaceClass</a></li>
<li class=""><a href="#method_set" title="set">set</a></li>
<li class=""><a href="#method_setAttribute" title="setAttribute">setAttribute</a></li>
<li class=""><a href="#method_setContent" title="setContent">setContent</a></li>
<li class=""><a href="#method_setStyle" title="setStyle">setStyle</a></li>
<li class=""><a href="#method_setStyles" title="setStyles">setStyles</a></li>
<li class=""><a href="#method_size" title="size">size</a></li>
<li class=""><a href="#method_some" title="some">some</a></li>
<li class=""><a href="#method_toDocFrag" title="toDocFrag">toDocFrag</a></li>
<li class=""><a href="#method_toggleClass" title="toggleClass">toggleClass</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright © 2009 Yahoo! Inc. All rights reserved.
</div>
</div>
<script type="text/javascript">
ALL_YUI_PROPS = [{"access": "", "host": "NodeList", "name": "addClass", "url": "NodeList.html#method_addClass", "type": "method"}, {"access": "", "host": "NodeList", "name": "after", "url": "NodeList.html#method_after", "type": "method"}, {"access": "", "host": "NodeList", "name": "append", "url": "NodeList.html#method_append", "type": "method"}, {"access": "", "host": "NodeList", "name": "detach", "url": "NodeList.html#method_detach", "type": "method"}, {"access": "", "host": "NodeList", "name": "detachAll", "url": "NodeList.html#method_detachAll", "type": "method"}, {"access": "", "host": "NodeList", "name": "each", "url": "NodeList.html#method_each", "type": "method"}, {"access": "", "host": "NodeList", "name": "even", "url": "NodeList.html#method_even", "type": "method"}, {"access": "", "host": "NodeList", "name": "filter", "url": "NodeList.html#method_filter", "type": "method"}, {"access": "", "host": "NodeList", "name": "get", "url": "NodeList.html#method_get", "type": "method"}, {"access": "", "host": "NodeList", "name": "getAttribute", "url": "NodeList.html#method_getAttribute", "type": "method"}, {"access": "", "host": "NodeList", "name": "getComputedStyle", "url": "NodeList.html#method_getComputedStyle", "type": "method"}, {"access": "", "host": "NodeList", "name": "getStyle", "url": "NodeList.html#method_getStyle", "type": "method"}, {"access": "", "host": "NodeList", "name": "hasClass", "url": "NodeList.html#method_hasClass", "type": "method"}, {"access": "", "host": "NodeList", "name": "indexOf", "url": "NodeList.html#method_indexOf", "type": "method"}, {"access": "", "host": "NodeList", "name": "insert", "url": "NodeList.html#method_insert", "type": "method"}, {"access": "", "host": "NodeList", "name": "item", "url": "NodeList.html#method_item", "type": "method"}, {"access": "", "host": "NodeList", "name": "modulus", "url": "NodeList.html#method_modulus", "type": "method"}, {"access": "", "host": "NodeList", "name": "NodeList.getDOMNodes", "url": "NodeList.html#method_NodeList.getDOMNodes", "type": "method"}, {"access": "", "host": "NodeList", "name": "odd", "url": "NodeList.html#method_odd", "type": "method"}, {"access": "", "host": "NodeList", "name": "on", "url": "NodeList.html#method_on", "type": "method"}, {"access": "", "host": "NodeList", "name": "prepend", "url": "NodeList.html#method_prepend", "type": "method"}, {"access": "", "host": "NodeList", "name": "refresh", "url": "NodeList.html#method_refresh", "type": "method"}, {"access": "", "host": "NodeList", "name": "remove", "url": "NodeList.html#method_remove", "type": "method"}, {"access": "", "host": "NodeList", "name": "removeClass", "url": "NodeList.html#method_removeClass", "type": "method"}, {"access": "", "host": "NodeList", "name": "replaceClass", "url": "NodeList.html#method_replaceClass", "type": "method"}, {"access": "", "host": "NodeList", "name": "set", "url": "NodeList.html#method_set", "type": "method"}, {"access": "", "host": "NodeList", "name": "setAttribute", "url": "NodeList.html#method_setAttribute", "type": "method"}, {"access": "", "host": "NodeList", "name": "setContent", "url": "NodeList.html#method_setContent", "type": "method"}, {"access": "", "host": "NodeList", "name": "setStyle", "url": "NodeList.html#method_setStyle", "type": "method"}, {"access": "", "host": "NodeList", "name": "setStyles", "url": "NodeList.html#method_setStyles", "type": "method"}, {"access": "", "host": "NodeList", "name": "size", "url": "NodeList.html#method_size", "type": "method"}, {"access": "", "host": "NodeList", "name": "some", "url": "NodeList.html#method_some", "type": "method"}, {"access": "", "host": "NodeList", "name": "toDocFrag", "url": "NodeList.html#method_toDocFrag", "type": "method"}, {"access": "", "host": "NodeList", "name": "toggleClass", "url": "NodeList.html#method_toggleClass", "type": "method"}];
</script>
</body>
</html>