Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
475
Is it possible to select an menu item via javascript?
posted

Hi!

I need to be able to select the top menu item when any child item is selected.  Here is my javascript for finding the top menu item of the clicked child item.

var menuItem = eventArgs.getItem();

var tmpMenuItem = menuItem;

while (tmpMenuItem.get_parentItem() != null)

{

    tmpMenuItem = tmpMenuItem.get_parentItem();

}   

//Here I want to select the tmpMenuItem which will be the top menuItem of the clicked child item.

 

I only find the get_selected() function but I need a set function here.

Is this possible in any way?

 

Parents Reply Children
No Data