Table of Contents
getLeftIcon Method 

Returns the current left icon Url.

Syntax
JavaScript
 MenuItem.getLeftIcon(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.

Return Value

Left icon url associated with the given state.

Remarks

Each menu item can have different left icons for different states, the table below lists all valid values for the state parameter:

Value Description
"Normal" Normal state.
"Hover" Hover state.
"Expanded" Expanded state.
"Selected" Selected state.
"SelectedHover" Selected hover state.
"SelectedExpanded" Selected expanded state.
"Disabled" Disabled state.
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 that no left icon will be displayed for that state. For example, if the Url for Normal state is set, even if Hover state Url is null, left icon for normal state will be displayed when mouse is over the item.

See item state for more details.

See Also