isSelected()
checks whether a specified Sidebar item is selected
isSelected(id: string | number): boolean;
Parameters:
id: string | number
- the id of a Sidebar item
Returns:
true
, if an item of Sidebar is selected; otherwise, false
.
Example
sidebar.isSelected("categoryPost"); // -> returns true/false
Related sample: Sidebar. Select / unselect
Change log:
added in v6.5