YUI recommends YUI3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

This documentation is no longer maintained.

YUI Library Examples: Menu Family: MenuItem Configuration Properties

Menu Family: MenuItem Configuration Properties

This example demonstrates how to set MenuItem configuration properties when adding items to a Menu instance.

Note: By default clicking outside of a Menu instance will hide it. Additionally, MenuItem instances without a submenu or a URL to navigate to will hide their parent Menu instance when clicked. Click the "Show Menu" button below to make the Menu instance visible if it is hidden.

Setting MenuItem configuration properties

A MenuItem has a number of configuration properties that affect its behavior and visual rendering. Any of these configuration properties can be set when adding an item to its parent Menu instance by defining them in an object that is passed to the Menu's addItem, insertItem, or addItems methods. This example ulitizes the following configuration properties: text, selected, disabled, url, and checked.

Menu Family Examples:

More Menu Family Resources:

Copyright © 2013 Yahoo! Inc. All rights reserved.

Privacy Policy - Copyright Policy - Job Openings