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.