Bubbling Library > Examples

Bubbling / Context Menus (YUI-CMS:YAHOO.CMS.bubbling): Tutorials


Examples of Using the Bubbling Technique: Bookmark Links

Include the corresponding behavior for Live Bookmark links and a context menu with the most important external bookmarker will be attach it to this class of links.

Examples of Using the Bubbling Technique: RSS Links - Feed Reader Context Menu

Include the corresponding behavior for RSS Feed links and a context menu with the most important external feed readers will be attach it to this class of links.

Combining both behavarios (Feeds and Bookmarks)

Benefit from the bubbling technique: Include the corresponding behavior for each context menu can improve the website functionality without worry about the listeners for each element with a context menu attached. In this case we will use both behaviors (Bookmark links and RSS links) in the same page.

Creating plug and play content menus (injecting the resources for RSS and bookmark behaviors)

In this case, we can use the injection feature from the Dispatch Plugin (YAHOO.util.Dispatcher) to load the widget onDemand and using this behaviors as widgets (plug and play widgets).

Attaching behaviors to menu's and menubar's items

See how to assign different behaviors to the menu's elements. Each behavior will correspond with the "classname" defined for each element in the JS's Array, also can be applied directly in the XHTML in case you're using menu from markup.