isSelected()
checks whether a specified Menu item is selected
isSelected(id: string | number): boolean;
Parameters:
id: string | number
- the id of a Menu item
Returns:
true
, if an item of Menu is selected; otherwise, false
.
Example
menu.isSelected("align-left"); // -> returns true/false
Related sample: Menu. Select / unselect
Change log:
added in v7.0