diff -r 000000000000 -r 40c8f766c9b8 src/cm/media/js/lib/yui/yui3.0.0/examples/event/event-simple_clean.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui3.0.0/examples/event/event-simple_clean.html Mon Nov 23 15:14:29 2009 +0100 @@ -0,0 +1,98 @@ + + + +
+ +Clicking in the blue box will pop up a "Hello World!" alert window. Clicking on the first link will take you to the YUI website; clicking on the second link, which has the same href attribute, will pop up an alert instead and not navigate to a new page.
Event Utility is used here to do two things:
+ +click event handler to the blue box;<a> element that uses preventDefault() to prevent the link, when clicked, from navigating to a new page. Click for Hello World alert.
+