O'Reilly logo

YUI 2.8 Learning the Library by Dan Wellman, Daniel Barreiro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Menu classes

This component, much like the Container that we looked at in the earlier chapter, is made up of a small family of different types of menu. There is a range of different classes that work together to bring the functionality of the different types of menu to you.

The three main classes behind the Menu family are:

  • YAHOO.widget.Menu
  • YAHOO.widget.ContextMenu
  • YAHOO.widget.MenuBar

Menu is a subclass of Overlay, part of the Container family, and the other two are subclasses of Menu. Just as each TabView is made of several Tabs, each kind of Menu has a different class for its items:

  • YAHOO.widget.MenuItem
  • YAHOO.widget.ContextMenuItem
  • YAHOO.widget.MenuBarItem

ContextMenuItem is simply an alias for MenuItem created just for the sake of symmetry. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required