node-screen.mustache revision fb1ecdf65fd4106deb62da339763f2e7670ca0f6
51607ea01068c9047391e4c8b46bc9dbd0edb7fdmark<link href="{{componentAssets}}/node.css" rel="stylesheet" type="text/css">
<p>In this example, we will listen for clicks on the <code>DD</code> elements and update them with screen information.</p>
var target = e.target,
if (target.test('dd')) {
if (target.test('.yui3-data-win')) {
h = target.get('winHeight');
w = target.get('winWidth');
} else if (target.test('.yui3-data-doc')) {
h = target.get('docHeight');
w = target.get('docWidth');
target.set('innerHTML', 'width: ' + w + ' height: ' + h);
<p>Now we just assign the click handler to the <code>DL</code> that will allow us to use event bubbling to handle clicks on each <code>DD</code>.</p>
Y.one('#demo').on('click', onClick);