Constructordojo.NodeList

<script src="../../js/dojo.js"></script>
defined in dojo/_base/NodeList.js

dojo.NodeList is as subclass of Array which adds syntactic sugar for chaining, common iteration operations, animation, and node manipulation. NodeLists are most often returned as the result of dojo.query() calls.

Usage

function () (view source)

Examples

Example 1

create a node list from a node

new dojo.NodeList(dojo.byId("foo"));

Jump to PropertiesFunctionsBack to top

FunctionaddContent(content: String, position: String|Integer?)
add a node or some HTML as a string to every item in the list. Returns the original list.
Functionadopt(queryOrListOrNode: String|Array|DomNode, position: String?)
places any/all elements in queryOrListOrNode at a
Functionanim(properties: Object, duration: Integer?, easing: Function?, onEnd: Function?, delay: Integer?)
Animate one or more CSS properties for all nodes in this list. The returned animation object will already be playing when it is returned. See the docs for `dojo.anim` for full details.
see dojo.animateProperty(). Animate all elements of this NodeList across the properties specified.
Functionconcat(item: Object...?)
Returns a new NodeList comprised of items in this NodeList as well as items passed in as parameters
Returns the box objects all elements in a node list as an Array (*not* a NodeList)
Functiondtl(template, context)
clears all content from each node in the list
Functionevery(callback: Function, thisObject: Object?)
see `dojo.every()` and: <http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every> Takes the same structure of arguments and returns as dojo.every() with the caveat that the passed array is implicitly this NodeList
FunctionfadeIn(args)
fade in all elements of this NodeList. Returns an instance of dojo._Animation
FunctionfadeOut(args)
fade out all elements of this NodeList. Returns an instance of dojo._Animation
FunctionfadeTo(args)
fade all elements of the node list to a specified opacity
Functionfilter(simpleQuery: String)
"masks" the built-in javascript filter() method to support passing a simple string filter in addition to supporting filtering function objects.
FunctionforEach(callback, thisObj)
see dojo.forEach(). The primary difference is that the acted-on array is implicitly this NodeList
Functionhighlight(args)
highlight all elements of the node list. Returns an instance of dojo._Animation
FunctionindexOf(value: Object, fromIndex: Integer?)
see dojo.indexOf(). The primary difference is that the acted-on array is implicitly this NodeList
Functioninstantiate(declaredClass: String|Object, properties: Object?)
Create a new instance of a specified class, using the specified properties and each node in the nodeList as a srcNodeRef
FunctionlastIndexOf(value: Object, fromIndex: Integer?)
see dojo.lastIndexOf(). The primary difference is that the acted-on array is implicitly this NodeList
Functionmap(func: Function, obj: Function?)
see dojo.map(). The primary difference is that the acted-on array is implicitly this NodeList and the return is a dojo.NodeList (a subclass of Array)
Functionorphan(simpleFilter: String?)
removes elements in this list that match the simple filter from their parents and returns them as a new NodeList.
Functionplace(queryOrNode: String|Node, position: String)
places elements of this node list relative to the first element matched by queryOrNode. Returns the original NodeList.
Functionquery(queryStr: String)
Returns a new, flattened NodeList. Elements of the new list satisfy the passed query but use elements of the current NodeList as query roots.
FunctionsizeTo(args)
size all elements of this NodeList. Returns an instance of dojo._Animation
Functionslice(begin: Integer, end: Integer?)
Returns a new NodeList, maintaining this one in place
FunctionslideBy(args)
slide all elements of this NodeList. Returns an instance of dojo._Animation
FunctionslideTo(args)
slide all elements of the node list to the specified place. Returns an instance of dojo._Animation
Functionsome(callback: Function, thisObject: Object?)
see dojo.some() and: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some Takes the same structure of arguments and returns as dojo.some() with the caveat that the passed array is implicitly this NodeList
Functionsplice(index: Integer, howmany: Integer?, item: Object...?)
Returns a new NodeList, manipulating this NodeList based on the arguments passed, potentially splicing in new elements at an offset, optionally deleting elements
FunctionwipeIn(args)
wipe in all elements of this NodeList. Returns an instance of dojo._Animation
FunctionwipeOut(args)
wipe out all elements of this NodeList. Returns an instance of dojo._Animation
FunctionwipeTo(args)
Wipe all elements of the NodeList to a specified width: or height:
Function_anim(obj, method, args)

Jump to FunctionsPropertiesBack to top