--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/media/js/lib/yui/yui_3.10.3/docs/node/ducks.html Tue Jul 16 14:29:46 2013 +0200
@@ -0,0 +1,970 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Example: Using NodeList - Ducks Game</title>
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic">
+ <link rel="stylesheet" href="../../build/cssgrids/cssgrids-min.css">
+ <link rel="stylesheet" href="../assets/css/main.css">
+ <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
+ <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
+ <script src="../../build/yui/yui-min.js"></script>
+
+</head>
+<body>
+<!--
+<a href="https://github.com/yui/yui3"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
+-->
+<div id="doc">
+ <div id="hd">
+ <h1><img src="http://yuilibrary.com/img/yui-logo.png"></h1>
+ </div>
+
+
+ <h1>Example: Using NodeList - Ducks Game</h1>
+ <div class="yui3-g">
+ <div class="yui3-u-3-4">
+ <div id="main">
+ <div class="content"><link href="../assets/node/node.css" rel="stylesheet" type="text/css">
+<div class="intro">
+ <p>This example demonstrates how to use multiple NodeList features to build a simple game.</p>
+</div>
+
+<div class="example">
+<style>
+.gallery{
+ position: relative;
+ background: url(../assets/node/images/background.png);
+ width: 638px;
+ height: 180px;
+ overflow: hidden;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ -moz-box-shadow: 0 0 45px #000 inset, 3px 0 6px rgba(0,0,0,0.8);
+ -webkit-box-shadow: 0 0 45px #000 inset, 3px 0 6px rgba(0,0,0,0.8);
+ border: 4px solid #637073;
+ cursor: crosshair;
+ margin: 0.5em 0 0.8em;
+}
+
+.water{
+ position: absolute;
+ top: 114px;
+ left: 0;
+ width: 677px;
+ height: 50px;
+}
+
+.water img{
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+
+.water .shadow {
+ left: 8px;
+ opacity: 0.5;
+ filter: alpha(opacity=30);
+}
+
+.duck-row {
+ position: absolute;
+ left: 10px;
+ top: 57px;
+ width: 1340px;
+ padding: 0;
+ margin: 0;
+}
+
+.duck-row li{
+ position: relative;
+ display: inline-block;
+ zoom: 1; *display: inline; /* IE < 8: fake inline-block */
+ width: 133px;
+ height: 70px;
+ margin: 0 -4px 0 0;
+ vertical-align: bottom;
+}
+
+.duck-row li img{
+ position: absolute;
+ bottom: 7px;
+ left: 0;
+}
+
+/* the voice bubble of the ducks */
+.duck-row .squawk {
+ position: absolute;
+ top: -400px;
+ left: 50px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ background-color: #ffe;
+ line-height: 1.2em;
+ border: solid 1px #cc8;
+ -moz-box-shadow: 2px 2px 2px rgba(0,0,0,0.2);
+ -webkit-box-shadow: 2px 2px 2px rgba(0,0,0,0.2);
+}
+
+.duck-row .squawk .text{
+ padding: 0.2em 0.4em 0.2em 0em;
+ text-indent: 0.2em;
+ overflow: hidden;
+}
+
+.small-squawk-bubble{
+ position: absolute;
+ bottom: -4px;
+ left: -8px;
+ width: 4px;
+ height: 4px;
+ border: solid 1px #cc8;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ background-color: #ffe;
+ font-size: 2px;
+}
+
+#button-reset{
+ margin-right: 2em;
+}
+
+.ducks-remain{
+ font-size: 150%;
+}
+
+#show-attitude{
+ margin-left: 8em;
+}
+</style>
+
+ <div class='gallery'>
+ <ul class="duck-row">
+ <li></li> <!-- each of these will be a duck -->
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ul>
+ <div class="water">
+ <img class="shadow" src="../assets/node/images/water-shadow.png"/>
+ <img src="../assets/node/images/water.png"/>
+ </div>
+ </div>
+ <button id="button-reset" class="yui3-button">Reset</button>
+ Ducks remaining: <span class="ducks-remain">10</span>
+ <input type="checkbox" id="show-attitude"/><label for="show-attitude">Show attitude</label>
+
+<script>
+YUI().use('transition', 'button', function (Y) {
+
+ var ducks = Y.all('.duck-row li'),
+ ducksRemaining = 10, // value for UI display
+ squawkTextIndex = 0, // index in the squawkTextArr to use next
+ squawkTextArr = [ // duck comments
+ '#@&~*Q!',
+ 'Hey!?',
+ '911 on U!',
+ "U fly's down",
+ 'duck pile!',
+ 'Ricochets kill!',
+ 'how sporting.',
+ "shoe's untied"
+ ];
+
+ // append the same content for each duck <li>
+ ducks.append('<img src="../assets/node/images/duck.png"/><div class="squawk"><div class="text">#@&~*Q!</div><div class="small-squawk-bubble"></div></div>');
+
+ // give them all the set-up state class
+ ducks.addClass('set-up');
+
+ // this makes the ducks move from right to left.
+ // When the duck on the far left disappears from view,
+ // it's added to the far right end of the row.
+ var makeDucksSwim = function () {
+ var frontDuck;
+
+ // move the duck row to the left one duck space over 2 seconds
+ Y.one('.duck-row').transition({
+ easing: 'linear',
+ left: '-119px',
+ duration: 2
+ }, function () { // when the row finishes its right to left transition...
+ // remove the first duck on the left
+ // which has trasitioned out of view
+ frontDuck = Y.one('.duck-row li').remove();
+
+ // append the removed first duck onto the right end
+ Y.one('.duck-row').appendChild(frontDuck);
+
+ // set the position for the next makeDucksSwim()
+ Y.one('.duck-row').setStyle('left', '10px');
+
+ // if there are ducks remaining, make them swim again
+ if (ducksRemaining > 0) {
+ makeDucksSwim();
+ }
+ });
+ }
+ makeDucksSwim(); // this initializes the ducks swimming
+
+ // handles a click on a duck
+ var duckClick = function(e) {
+ var squawks;
+
+ // remove the squawk belonging to the duck that was clicked
+ e.currentTarget.one('.squawk').setStyles({'top': '-400px', 'opacity': '1'});
+
+ // makes the ducks appear to lay back when clicked
+ e.target.transition({
+ duration: 0.2,
+ height: '3px',
+ width: '133px'
+ });
+
+ // the clicked duck will no longer have the 'set-up' class/state
+ e.currentTarget.removeClass('set-up');
+ makeDucksSquawk();
+ updateDucksRemaining(); // update the number of ducks still set up
+ };
+
+ // this makes the duck's squawks show and hide and get various text
+ var makeDucksSquawk = function(){
+ squawks = Y.all('.duck-row .set-up .squawk'); // a NodeList of the squawks of set-up ducks
+ if (Y.one('#show-attitude')._node.checked) { // only have ducks squawk if the checkbox is checked
+ // fill voice bubbles with next text string
+ Y.all('.duck-row .set-up .squawk .text').setHTML(squawkTextArr[squawkTextIndex]);
+
+ // increment the index to get the next squawk text
+ squawkTextIndex = (squawkTextIndex += 1) % (squawkTextArr.length);
+ squawks.transition({
+ top: {
+ delay: 0.5,
+ value: '0px', // drop squawks into position from hidden
+ duration: 0 // instant position change
+ },
+ opacity: { // fade out
+ delay: 3.0,
+ duration: 0.3,
+ value: 0
+ }
+ }, function(e){
+ // after squawks are faded out,
+ // move them to hidden position and set opacity to 1 again
+ squawks.setStyles({'top': '-400px', 'opacity': '1'});
+ });
+ }
+ }
+
+ // This resets all ducks, "ducks remaining" counters, and row position
+ // make the duck images full height
+ // start them swimming
+ var reset = function() {
+ Y.all('.duck-row li img').setStyle('height', '55px');
+ Y.all('.duck-row li').addClass('set-up');
+ updateDucksRemaining();
+ makeDucksSwim();
+ }
+
+ // counts the ducks remaining, and updates the UI counter display
+ var updateDucksRemaining = function() {
+ ducksRemaining = Y.all('.gallery li.set-up').size();
+ Y.one('.ducks-remain').setHTML(ducksRemaining);
+ }
+
+ // listeners
+ Y.one('.duck-row').delegate('click', duckClick, 'li');
+ Y.one('#button-reset').on('click', reset);
+});
+</script>
+
+
+</div>
+
+
+
+<h2>The HTML</h2>
+<pre class="code prettyprint"><div class='gallery'>
+ <ul class="duck-row">
+ <li></li> <!-- each of these will be a duck -->
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ul>
+ <div class="water">
+ <img class="shadow" src="../assets/node/images/water-shadow.png"/>
+ <img src="../assets/node/images/water.png"/>
+ </div>
+</div>
+<button id="button-reset" class="yui3-button">Reset</button>
+Ducks remaining: <span class="ducks-remain">10</span>
+<input type="checkbox" id="show-attitude"/><label for="show-attitude">Show attitude</label></pre>
+
+
+<h2>YUI Instance</h2>
+<p>
+The <code>use</code> statement doesn't include <code>node</code> because it's loaded as a requirement of transition.
+</p>
+<pre class="code prettyprint">YUI().use('transition', 'button', function(Y){
+ // code goes here
+});</pre>
+
+
+<h2>Setting Vars</h2>
+<p>
+The variable <code>ducks</code> is used for easily manipulating all the ducks at once.
+We'll display various duck comments from the array <code>squawkTextArr</code> on a rotating basis.
+</p>
+<pre class="code prettyprint">var ducks = Y.all('.duck-row li'),
+ ducksRemaining = 10, // value for UI display
+ squawkTextIndex = 0, // index in the squawkTextArr to use next
+ squawkTextArr = [ // duck comments
+ '#@&~*Q!',
+ 'Hey!?',
+ '911 on U!',
+ "U&nbsp;fly's&nbsp;down",
+ 'duck&nbsp;pile!',
+ 'Ricochets&nbsp;kill!',
+ 'how&nbsp;sporting.',
+ "shoe's&nbsp;untied"
+ ];</pre>
+
+
+<h2>Initializing the Ducks</h2>
+<p>
+Repetitive markup is added with the <code>.append()</code> method to all the ducks in the <code>NodeList</code>.
+This keeps the original markup simple and clear.
+</p>
+<pre class="code prettyprint">// append the same content for each duck <li>
+ducks.append('<img src="../assets/node/images/duck.png"/><div class="squawk"><div class="text">#@&~*Q!</div><div class="small-squawk-bubble"></div></div>');</pre>
+
+<p>
+All the ducks in the <code>NodeList</code> are given the <code>set-up</code> class with the <code>.addClass()</code> method.
+This class is found on any duck that has the state of being set up, as opposed to being knocked down.
+</p>
+<pre class="code prettyprint">// give them all the set-up state class
+ducks.addClass('set-up');</pre>
+
+<p>
+This state could be a Boolean property, but it's handy as a class,
+because a <code>NodeList</code> can be made containing the squawks of all "set up" ducks in this way,
+<code>squawks = Y.all('.duck-row .set-up .squawk');</code>
+as we'll see in the <code>makeDucksSquawk</code> function.
+</p>
+
+<h2>Making the Ducks Swim</h2>
+<p>
+This uses <code>transition</code> to make the ducks swim right to left
+</p>
+<pre class="code prettyprint">// this makes the ducks move from right to left.
+// When the duck on the far left disappears from view,
+// it's added to the far right end of the row.
+var makeDucksSwim = function () {
+ var frontDuck;
+
+ // move the duck row to the left one duck space over 2 seconds
+ Y.one('.duck-row').transition({
+ easing: 'linear',
+ left: '-119px',
+ duration: 2
+ }, function () { // when the row finishes its right to left transition...
+ // remove the first duck on the left
+ // which has trasitioned out of view
+ frontDuck = Y.one('.duck-row li').remove();
+
+ // append the removed first duck onto the right end
+ Y.one('.duck-row').appendChild(frontDuck);
+
+ // set the position for the next makeDucksSwim()
+ Y.one('.duck-row').setStyle('left', '10px');
+
+ // if there are ducks remaining, make them swim again
+ if (ducksRemaining > 0) {
+ makeDucksSwim();
+ }
+ });
+}
+makeDucksSwim(); // this initializes the ducks swimming</pre>
+
+
+<h2>Click Event Handler</h2>
+<p>
+</p>
+<pre class="code prettyprint">// handles a click on a duck
+var duckClick = function(e) {
+ var squawks;
+
+ // remove the squawk belonging to the duck that was clicked
+ e.currentTarget.one('.squawk').setStyles({'top': '-400px', 'opacity': '1'});
+
+ // makes the ducks appear to lay back when clicked
+ e.target.transition({
+ duration: 0.2,
+ height: '3px',
+ width: '133px'
+ });
+
+ // the clicked duck will no longer have the 'set-up' class/state
+ e.currentTarget.removeClass('set-up');
+ makeDucksSquawk(); // makes the ducks squawk
+ updateDucksRemaining(); // update the number of ducks still set up
+};</pre>
+
+
+<h2>Squawking Ducks</h2>
+<p>
+</p>
+<pre class="code prettyprint">// this makes the duck's squawks show and hide and get various text
+var makeDucksSquawk = function(){
+ squawks = Y.all('.duck-row .set-up .squawk'); // a NodeList of the squawks of set-up ducks
+ if (Y.one('#show-attitude')._node.checked) { // only have ducks squawk if the checkbox is checked
+ // fill voice bubbles with next text string
+ Y.all('.duck-row .set-up .squawk .text').setHTML(squawkTextArr[squawkTextIndex]);
+
+ // increment the index to get the next squawk text
+ squawkTextIndex = (squawkTextIndex += 1) % (squawkTextArr.length);
+ squawks.transition({
+ top: {
+ delay: 0.5,
+ value: '0px', // drop squawks into position from hidden
+ duration: 0 // instant position change
+ },
+ opacity: { // fade out
+ delay: 3.0,
+ duration: 0.3,
+ value: 0
+ }
+ }, function(e){
+ // after squawks are faded out,
+ // move them to hidden position and set opacity to 1 again
+ squawks.setStyles({'top': '-400px', 'opacity': '1'});
+ });
+ }
+}</pre>
+
+
+<h2>Reset and Ducks Remaining</h2>
+<pre class="code prettyprint">// This resets all ducks, "ducks remaining" counters, and row position
+// make the duck images full height
+// start them swimming
+var reset = function() {
+ Y.all('.duck-row li img').setStyle('height', '55px');
+ Y.all('.duck-row li').addClass('set-up');
+ updateDucksRemaining();
+ makeDucksSwim();
+}
+
+// counts the ducks remaining, and updates the UI counter display
+var updateDucksRemaining = function() {
+ ducksRemaining = Y.all('.gallery li.set-up').size();
+ Y.one('.ducks-remain').setHTML(ducksRemaining);
+}</pre>
+
+<h2>Prefer <code>node.delegate()</code> over <code>nodelist.on()</code></h2>
+
+<p>Sometimes you need to create individual subscriptions for each Node in a
+NodeList, but usually it's preferable to use
+<a href="node-evt-delegation.html">event delegation</a> as shown in this example.</p>
+
+<h2>Listeners</h2>
+<p>
+
+</p>
+<pre class="code prettyprint">// listeners
+Y.one('.duck-row').delegate('click', duckClick, 'li');
+Y.one('#button-reset').on('click', reset);</pre>
+
+
+<h2>Complete Ducks Example Source</h2>
+<pre class="code prettyprint"><style>
+.gallery{
+ position: relative;
+ background: url(../assets/node/images/background.png);
+ width: 638px;
+ height: 180px;
+ overflow: hidden;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ -moz-box-shadow: 0 0 45px #000 inset, 3px 0 6px rgba(0,0,0,0.8);
+ -webkit-box-shadow: 0 0 45px #000 inset, 3px 0 6px rgba(0,0,0,0.8);
+ border: 4px solid #637073;
+ cursor: crosshair;
+ margin: 0.5em 0 0.8em;
+}
+
+.water{
+ position: absolute;
+ top: 114px;
+ left: 0;
+ width: 677px;
+ height: 50px;
+}
+
+.water img{
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+
+.water .shadow {
+ left: 8px;
+ opacity: 0.5;
+ filter: alpha(opacity=30);
+}
+
+.duck-row {
+ position: absolute;
+ left: 10px;
+ top: 57px;
+ width: 1340px;
+ padding: 0;
+ margin: 0;
+}
+
+.duck-row li{
+ position: relative;
+ display: inline-block;
+ zoom: 1; *display: inline; /* IE < 8: fake inline-block */
+ width: 133px;
+ height: 70px;
+ margin: 0 -4px 0 0;
+ vertical-align: bottom;
+}
+
+.duck-row li img{
+ position: absolute;
+ bottom: 7px;
+ left: 0;
+}
+
+/* the voice bubble of the ducks */
+.duck-row .squawk {
+ position: absolute;
+ top: -400px;
+ left: 50px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ background-color: #ffe;
+ line-height: 1.2em;
+ border: solid 1px #cc8;
+ -moz-box-shadow: 2px 2px 2px rgba(0,0,0,0.2);
+ -webkit-box-shadow: 2px 2px 2px rgba(0,0,0,0.2);
+}
+
+.duck-row .squawk .text{
+ padding: 0.2em 0.4em 0.2em 0em;
+ text-indent: 0.2em;
+ overflow: hidden;
+}
+
+.small-squawk-bubble{
+ position: absolute;
+ bottom: -4px;
+ left: -8px;
+ width: 4px;
+ height: 4px;
+ border: solid 1px #cc8;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ background-color: #ffe;
+ font-size: 2px;
+}
+
+#button-reset{
+ margin-right: 2em;
+}
+
+.ducks-remain{
+ font-size: 150%;
+}
+
+#show-attitude{
+ margin-left: 8em;
+}
+</style>
+
+ <div class='gallery'>
+ <ul class="duck-row">
+ <li></li> <!-- each of these will be a duck -->
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ul>
+ <div class="water">
+ <img class="shadow" src="../assets/node/images/water-shadow.png"/>
+ <img src="../assets/node/images/water.png"/>
+ </div>
+ </div>
+ <button id="button-reset" class="yui3-button">Reset</button>
+ Ducks remaining: <span class="ducks-remain">10</span>
+ <input type="checkbox" id="show-attitude"/><label for="show-attitude">Show attitude</label>
+
+<script>
+YUI().use('transition', 'button', function (Y) {
+
+ var ducks = Y.all('.duck-row li'),
+ ducksRemaining = 10, // value for UI display
+ squawkTextIndex = 0, // index in the squawkTextArr to use next
+ squawkTextArr = [ // duck comments
+ '#@&~*Q!',
+ 'Hey!?',
+ '911 on U!',
+ "U&nbsp;fly's&nbsp;down",
+ 'duck&nbsp;pile!',
+ 'Ricochets&nbsp;kill!',
+ 'how&nbsp;sporting.',
+ "shoe's&nbsp;untied"
+ ];
+
+ // append the same content for each duck <li>
+ ducks.append('<img src="../assets/node/images/duck.png"/><div class="squawk"><div class="text">#@&~*Q!</div><div class="small-squawk-bubble"></div></div>');
+
+ // give them all the set-up state class
+ ducks.addClass('set-up');
+
+ // this makes the ducks move from right to left.
+ // When the duck on the far left disappears from view,
+ // it's added to the far right end of the row.
+ var makeDucksSwim = function () {
+ var frontDuck;
+
+ // move the duck row to the left one duck space over 2 seconds
+ Y.one('.duck-row').transition({
+ easing: 'linear',
+ left: '-119px',
+ duration: 2
+ }, function () { // when the row finishes its right to left transition...
+ // remove the first duck on the left
+ // which has trasitioned out of view
+ frontDuck = Y.one('.duck-row li').remove();
+
+ // append the removed first duck onto the right end
+ Y.one('.duck-row').appendChild(frontDuck);
+
+ // set the position for the next makeDucksSwim()
+ Y.one('.duck-row').setStyle('left', '10px');
+
+ // if there are ducks remaining, make them swim again
+ if (ducksRemaining > 0) {
+ makeDucksSwim();
+ }
+ });
+ }
+ makeDucksSwim(); // this initializes the ducks swimming
+
+ // handles a click on a duck
+ var duckClick = function(e) {
+ var squawks;
+
+ // remove the squawk belonging to the duck that was clicked
+ e.currentTarget.one('.squawk').setStyles({'top': '-400px', 'opacity': '1'});
+
+ // makes the ducks appear to lay back when clicked
+ e.target.transition({
+ duration: 0.2,
+ height: '3px',
+ width: '133px'
+ });
+
+ // the clicked duck will no longer have the 'set-up' class/state
+ e.currentTarget.removeClass('set-up');
+ makeDucksSquawk();
+ updateDucksRemaining(); // update the number of ducks still set up
+ };
+
+ // this makes the duck's squawks show and hide and get various text
+ var makeDucksSquawk = function(){
+ squawks = Y.all('.duck-row .set-up .squawk'); // a NodeList of the squawks of set-up ducks
+ if (Y.one('#show-attitude')._node.checked) { // only have ducks squawk if the checkbox is checked
+ // fill voice bubbles with next text string
+ Y.all('.duck-row .set-up .squawk .text').setHTML(squawkTextArr[squawkTextIndex]);
+
+ // increment the index to get the next squawk text
+ squawkTextIndex = (squawkTextIndex += 1) % (squawkTextArr.length);
+ squawks.transition({
+ top: {
+ delay: 0.5,
+ value: '0px', // drop squawks into position from hidden
+ duration: 0 // instant position change
+ },
+ opacity: { // fade out
+ delay: 3.0,
+ duration: 0.3,
+ value: 0
+ }
+ }, function(e){
+ // after squawks are faded out,
+ // move them to hidden position and set opacity to 1 again
+ squawks.setStyles({'top': '-400px', 'opacity': '1'});
+ });
+ }
+ }
+
+ // This resets all ducks, "ducks remaining" counters, and row position
+ // make the duck images full height
+ // start them swimming
+ var reset = function() {
+ Y.all('.duck-row li img').setStyle('height', '55px');
+ Y.all('.duck-row li').addClass('set-up');
+ updateDucksRemaining();
+ makeDucksSwim();
+ }
+
+ // counts the ducks remaining, and updates the UI counter display
+ var updateDucksRemaining = function() {
+ ducksRemaining = Y.all('.gallery li.set-up').size();
+ Y.one('.ducks-remain').setHTML(ducksRemaining);
+ }
+
+ // listeners
+ Y.one('.duck-row').delegate('click', duckClick, 'li');
+ Y.one('#button-reset').on('click', reset);
+});
+</script></pre>
+
+</div>
+ </div>
+ </div>
+
+ <div class="yui3-u-1-4">
+ <div class="sidebar">
+
+
+
+ <div class="sidebox">
+ <div class="hd">
+ <h2 class="no-toc">Examples</h2>
+ </div>
+
+ <div class="bd">
+ <ul class="examples">
+
+
+ <li data-description="Using selectors and property accessors with Node.">
+ <a href="properties.html">Set and Get Properties</a>
+ </li>
+
+
+
+ <li data-description="Using DOM methods with Node.">
+ <a href="dom-node.html">DOM Methods</a>
+ </li>
+
+
+
+ <li data-description="Building a simple store and shopping cart.">
+ <a href="store.html">DOM Methods - Store</a>
+ </li>
+
+
+
+ <li data-description="Listening for DOM events with Node instances.">
+ <a href="events.html">Handling DOM Events</a>
+ </li>
+
+
+
+ <li data-description="NodeList provides Node functionality for manipulating multiple nodes at once.">
+ <a href="nodelist.html">Using NodeList - Simple</a>
+ </li>
+
+
+
+ <li data-description="How to use multiple NodeList features to build a simple game.">
+ <a href="ducks.html">Using NodeList - Ducks Game</a>
+ </li>
+
+
+
+ <li data-description="Using a single event listener to handle events on multiple nodes.">
+ <a href="node-evt-delegation.html">Delegating Node Events</a>
+ </li>
+
+
+
+ <li data-description="This example demonstrates how to position an element in page coordinates.">
+ <a href="node-xy.html">Node Positioning</a>
+ </li>
+
+
+
+ <li data-description="This example demonstrates how to set styles and get style information.">
+ <a href="node-style.html">Node Styling</a>
+ </li>
+
+
+
+ <li data-description="This example demonstrates how to insert content into a Node.">
+ <a href="node-insert.html">Adding Node Content - Burger Builder</a>
+ </li>
+
+
+
+ <li data-description="This example demonstrates how to show and hide a Node.">
+ <a href="node-view.html">Showing and Hiding</a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </ul>
+ </div>
+ </div>
+
+
+
+ <div class="sidebox">
+ <div class="hd">
+ <h2 class="no-toc">Examples That Use This Component</h2>
+ </div>
+
+ <div class="bd">
+ <ul class="examples">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li data-description="Creating an accessible toolbar using the Focus Manager Node Plugin and Node's support for the WAI-ARIA Roles and States.">
+ <a href="../node-focusmanager/node-focusmanager-toolbar.html">Accessible Toolbar</a>
+ </li>
+
+
+
+ <li data-description="Creating an accessible menu button using the Focus Manager Node Plugin, Event's delegation support and mouseenter event, along with the Overlay widget and Node's support for the WAI-ARIA Roles and States.">
+ <a href="../node-focusmanager/node-focusmanager-button.html">Accessible Menu Button</a>
+ </li>
+
+
+
+ <li data-description="Use the Event Utility to attach simple DOM event handlers.">
+ <a href="../event/basic-example.html">Simple DOM Events</a>
+ </li>
+
+
+
+ <li data-description="Example Photo Browser application.">
+ <a href="../dd/photo-browser.html">Photo Browser</a>
+ </li>
+
+
+
+ <li data-description="Portal style example using Drag & Drop Event Bubbling and Animation.">
+ <a href="../dd/portal-drag.html">Portal Style Example</a>
+ </li>
+
+
+
+ <li data-description="Use IO to request XML data from a remote web service.">
+ <a href="../io/weather.html">Request XML data from Yahoo! Weather</a>
+ </li>
+
+
+
+ <li data-description="Use IO to make a cross-domain request to Yahoo! Pipes, returning data from disparate sources.">
+ <a href="../io/xdr.html">Request JSON using Yahoo! Pipes</a>
+ </li>
+
+
+ </ul>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+</div>
+
+<script src="../assets/vendor/prettify/prettify-min.js"></script>
+<script>prettyPrint();</script>
+
+<script>
+YUI.Env.Tests = {
+ examples: [],
+ project: '../assets',
+ assets: '../assets/node',
+ name: 'ducks',
+ title: 'Using NodeList - Ducks Game',
+ newWindow: '',
+ auto: false
+};
+YUI.Env.Tests.examples.push('properties');
+YUI.Env.Tests.examples.push('dom-node');
+YUI.Env.Tests.examples.push('store');
+YUI.Env.Tests.examples.push('events');
+YUI.Env.Tests.examples.push('nodelist');
+YUI.Env.Tests.examples.push('ducks');
+YUI.Env.Tests.examples.push('node-evt-delegation');
+YUI.Env.Tests.examples.push('node-xy');
+YUI.Env.Tests.examples.push('node-style');
+YUI.Env.Tests.examples.push('node-insert');
+YUI.Env.Tests.examples.push('node-view');
+YUI.Env.Tests.examples.push('node-focusmanager-toolbar');
+YUI.Env.Tests.examples.push('node-focusmanager-button');
+YUI.Env.Tests.examples.push('basic-example');
+YUI.Env.Tests.examples.push('photo-browser');
+YUI.Env.Tests.examples.push('portal-drag');
+YUI.Env.Tests.examples.push('weather');
+YUI.Env.Tests.examples.push('xdr');
+
+</script>
+<script src="../assets/yui/test-runner.js"></script>
+
+
+
+</body>
+</html>