Cancel Event Sample

This sample demonstrates how event bubbling is cancelled with the cancelBubble property. By setting the cancelBubble property to true, the default action is not executed. In this case, a rollover effect occurs for every item but Ham, where the event is explicitly cancelled.

Milk Cookies Eggs Ham Cheese Pasta Chicken


[Right-click and choose View Source from the shortcut menu.]

© 2007 Microsoft Corporation. All rights reserved. Terms of use.