Table of Contents
setLeftIcon Method 

Sets left icon Url for a given state.

Syntax
JavaScript
 MenuItem.setLeftIcon(url, state)

Parameters

url
The new Url.
state
Optional. If provided, sets the url for the specified state, otherwise, sets the url of Normal state. See getLeftIcon for a complete list of valid values for this paramter.
Remarks

Use this function to set the item's left icon url for the specified state. Note icon provided for one state may be used by other states. For example, if Normal state's Url is set, when item is in Hover state but Hover state's Url is not defined, Normal state's Url will be used.

See item state for more details.

See Also