diff -r 000000000000 -r 40c8f766c9b8 src/cm/media/js/lib/yui/yui_3.0.0b1/examples/node/node-screen.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui_3.0.0b1/examples/node/node-screen.html Mon Nov 23 15:14:29 2009 +0100 @@ -0,0 +1,226 @@ + + + + + YUI Library Examples: Node: Measuring the Window and Document + + + + + + + + + + + + +
+
+
+

+ + YUI 3.x Home - + +

+
+ + +
+ + + +
+
+
+
+

YUI Library Examples: Node: Measuring the Window and Document

+
+
+ +

Note: This is YUI 3.x. Looking for YUI 2.x?

+ +
+
+
+
+ +

Node: Measuring the Window and Document

+ +
+

+

This example shows how to measure the size of the window and document.

+ +

+ +
+
+ + + + +
+
Window size
+
Click me to find out
+
Document size
+
Click me to find out
+
+ + + + + + +
+
+
+ +

Setting up the HTML

+

First we need some HTML to work with.

+ + +

Getting the Dimensions

+

In this example, we will listen for clicks on the DD elements and update them with screen information.

+ + +

Adding a Click Listener

+

Now we just assign the click handler to the DL that will allow us to use event bubbling to handle clicks on each DD.

+ + +

Full Script Source

+ +
+ +
+ +
+
+ + + +
+ +
+

Copyright © 2009 Yahoo! Inc. All rights reserved.

+

Privacy Policy - + Terms of Service - + Copyright Policy - + Job Openings

+
+
+ + + +