DOJO: Opening menu item on mouseover when using dijit.MenuBar

I’m using dojo at the project I’m working on now. One of the problems I encounter when  was how  to make the menu open when mouse over it.  I found a solution on the dojo maillist. Here is the function that does the “magic”:

dijit._MenuBase.prototype.onItemHover = function(item){

       this.focusChild(item);

       if(this.focusedChild.popup && !this.focusedChild.disabled){
            this._openPopup();
       }
};

Source: here

Bookmark and Share

5 thoughts on “DOJO: Opening menu item on mouseover when using dijit.MenuBar

  1. I have a requirment of in DOJO for Closing menu item on mouseleave when using dijit.MenuBar
    Any Suggestions or help would be helpful ??

  2. div data-dojo-type=”dijit/MenuBar” id=”navMenu” data-dojo-props=’passivePopupDelay: 1, popupDelay: 1′

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s