YUI Library Examples: Menu Family: MenuItem Configuration Properties

Menu Family: MenuItem Configuration Properties

This example demonstrates how to set configuration properties when instantiating a MenuItem instance.

Note: By default clicking outside of a menu will hide it. Additionally, menu items without a submenu or a URL to navigate will hide their parent menu when clicked. Click the "Show Menu" button below to make the menu 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, helptext, url, emphasis, strongemphasis, and checked.

Copyright © 2007 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings