PDA

View Full Version : How To trigger mouseover event on a menu item



sheonbanks
30 Oct 2016, 5:00 PM
My extjs menu is rendered in my browser. If I scroll over menu items, submenu items will appears. I'd like to create a javascript function that will trigger the same mouseover behaviour. When I trigger a mouseover event on the menuitemusing javascript , nothing happens. Is there a way to use a javascript function to trigger a mouseover event on a menu item in order to see the submenu?

Gary Schlosberg
31 Oct 2016, 9:53 AM
I don't see a mouseover event for menu items. Can you use the focus event?
http://docs.sencha.com/extjs/4.2.6/#!/api/Ext.menu.Item-event-focus

sheonbanks
31 Oct 2016, 3:20 PM
Focus doesn't work.

My ultimate goal is to show a submenu item of a given menuitem. This has to be done on the Javascript side as opposed to using Ext.js code. I am running into issues selecting the item in and expanding it to show the submenu.

Gary Schlosberg
31 Oct 2016, 3:31 PM
It's hard for me to say without seeing code. Can you not use the menu (http://docs.sencha.com/extjs/4.2.6/#!/api/Ext.menu.Item-cfg-menu) config in a menu item to create a submenu?