dom-node.mustache revision 6498bc9a9a5253d75da1c8234f2715e29947f684
919N/A<p>Most common DOM methods are available via Node instances. These can be used to add, remove, and retrieve other nodes.</p>
919N/A<p>Now we need a handler to move a node to a new list when the <code>click</code> event fires.</p>
919N/A<p>Note that <code>appendChild</code> returns a Node instance representing the node that was appended.</p>
235N/A node.addClass('yui-pass');
98N/A<p>We can assign our handler to all of the items by using the <code>all</code> method to get a <code>NodeList</code> instance and using the <code>on</code> method to subscribe to the event.</p>
911N/A<p>Sometimes you need to create individual subscriptions for each Node in a NodeList (as is done in this example), but usually it's preferable to <a href="node-evt-delegation.html">use event delegation</a>.</p>