-
29 Aug 2012 4:01 AM #1
Answered: Showing popup menu on onmouseover
Answered: Showing popup menu on onmouseover
Hi,
I have to populate ExtJS menu on onmouseover of div control. Please let me know how can if you have any idea.
Regards, Pravin
-
Best Answer Posted by redraid
Add listener to div mouseenter event.
html:
js:Code:<div id="test">Test</div>
live: http://jsfiddle.net/6mS9G/1/Code:Ext.onReady(function() { var menu = Ext.create('Ext.menu.Menu', { floating: true, items: [{ text: 'regular item 1'}, { text: 'regular item 2'}, { text: 'regular item 3'}] }); var div = Ext.get('test'); div.on('mouseenter', function(e) { menu.showAt(e.getXY()); }); console.log(div); });
-
29 Aug 2012 4:53 AM #2
Add listener to div mouseenter event.
html:
js:Code:<div id="test">Test</div>
live: http://jsfiddle.net/6mS9G/1/Code:Ext.onReady(function() { var menu = Ext.create('Ext.menu.Menu', { floating: true, items: [{ text: 'regular item 1'}, { text: 'regular item 2'}, { text: 'regular item 3'}] }); var div = Ext.get('test'); div.on('mouseenter', function(e) { menu.showAt(e.getXY()); }); console.log(div); });
-
29 Aug 2012 7:39 PM #3
Thanks... nice solution.
Pravin


Reply With Quote