Table of Contents
getImage Method 

Returns the current image Url for an image only menu item.

Syntax
JavaScript
 MenuItem.getImage(state)

Parameters

state
Optional. A string value specified which state of the url the function should return. If not provided, Url for the Normal state is returned. See getLeftIcon for a complete list of valid values for this paramter.

Return Value

Image Url associated with the given state.

Remarks
If the Url for the specified state is not set, null is returned.

Note even if this function returns null, it does not necessarily mean no image will be displayed for that state. For example, if the Url for Normal state is set, even if Hover state Url is null, image for normal state will be displayed when mouse is over the menu item.

See item state for more details.
See Also