Reputation: 726
I have problem with my menu bar items getting stack in the wrong stat. so I am trying manually to set there state depends on the mouse events. However something is not working I have tried:
dijit.byId("someDiv")._setStateClass(this.selected=false);
dijit.byId("someDiv")._set(“selected”, false);
dijit.byId("someDiv")._set(“active”, false);
url: http://dojotoolkit.org/api/ in dijit.MenuBarItem
Thanks
Upvotes: 0
Views: 957
Reputation: 3538
Looking at the source for _MenuBase and MenuBar, you want to emulate the behavior they get from:
menuBar.focusChild
to set the focus and then a combination of closeChild()
and onItemUnhover()
to remove it.
From closeChild()
you can try
item._setSelected(false);
and from onItemUnhover()
try
item._set("hovering", false);
Upvotes: 2