Results 1 to 3 of 3

Thread: Showing popup menu on onmouseover

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Location
    Pune, India
    Posts
    78
    Answers
    5
    Vote Rating
    0
      0  

    Default 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

  2. Add listener to div mouseenter event.
    html:
    Code:
    ?<div id="test">Test</div>???????????????????????????
    js:
    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);
    });?
    live: http://jsfiddle.net/6mS9G/1/

  3. #2
    Sencha User
    Join Date
    May 2011
    Location
    Ukraine, Rivne
    Posts
    250
    Answers
    44
    Vote Rating
    44
      0  

    Default

    Add listener to div mouseenter event.
    html:
    Code:
    ?<div id="test">Test</div>???????????????????????????
    js:
    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);
    });?
    live: http://jsfiddle.net/6mS9G/1/

  4. #3
    Sencha User
    Join Date
    Aug 2012
    Location
    Pune, India
    Posts
    78
    Answers
    5
    Vote Rating
    0
      0  

    Default

    Thanks... nice solution.

    Pravin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •