The Menu family of components features a collection of controls that make it easy to add menus to a website or web application. With the Menu Controls you can create website fly-out menus, customized context menus, or application-style menu bars with just a small amount of scripting.
The Menu family of controls features:
Keyboard and mouse navigation.
A rich event model that provides access to all of a Menu instance's interesting moments.
The Menu Family
Subclass of YAHOO.widget.Overlay. Menu is the base class for all menu containers. The Menu class creates a container that holds a vertical list representing a set of options or commands.
Subclass of Menu. Creates a list of options or commands that are made visible in response to an HTML element's "contextmenu" event ("mousedown" for Opera).
Subclass of Menu. Horizontal collection of items, each of which can contain a submenu.
Menu Object Model
The following diagrams illustrate the object model for the widgets that compose the Menu family of controls:
Menu Item Types
Each Menu type has a corresponding type for its items.
Menu instances can be nested inside MenuItem instances to create a menu hierarchy. Each menu item type has a corresponding submenu type.
To use the Menu library, include the following source files in the web page: