Results 1 to 5 of 5

Thread: flexmenu problem with jquery datatable

  1. #1
    Join Date
    Jun 2015
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question flexmenu problem with jquery datatable

    1) Script Title: flexmenu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...exdropdown.htm

    3) Describe problem: I'm trying to implement the flex menu with jquery datatable, all is working fine except when the menu show-up on upper direction it disappear immediately when moving the mouse to select item from the menu.

    I'm using the below code to assign flexmenu to each tr and td:

    Code:
                   iLoop = 1;
                   $("#tblStuList tbody tr").each(function () {
                       $("<ul id=flexmenu" + StudIDArray[iLoop] + " class=flexdropdownmenu>"
                           + "<li><a href=javascript:void(popup('sreport.aspx?userid=" + StudIDArray[iLoop] + "',650,400,'SINFO'))>Student Information</a></li>"
                           + "<li><a href=javascript:void(popup('sgrade.aspx?userid=',650,400,'Grades'))>Grades " + StudIDArray[iLoop] + "</a></li>"
                           + "<li><a href=javascript:void(popup('astud.aspx?id=',650,500,'Attendnace'))>Attendance</a></li>"
                           + "<li><a href=javascript:void(popup('schedule.aspx?term=1234',650,500,'schedule'))>Schedule</a></li>"
                           + "<li><a href=javascript:void(popup('scomments.asp?id='50,450,'FCommens'))>Faculty & General Comments</a></li>"
                           + "<li><a href=#>Academic Records</a> "
                           + "<ul>"
                            + "<Li><A href=#>Transcript and GPA</A></Li>"
                            + "<Li><A href=#>Degree Audit</A></Li>"
                            + "<Li><A href=#>At Risk</A></Li>"
                           + "</ul>"
                           + "</Li>"
                           + "</ul>").appendTo('#flexmenuDiv');
                       $(this).find('td:not(:has(input))').each(function () {
                           $(this).addflexmenu('flexmenu' + StudIDArray[iLoop]);
                           $(this).attr('nowrap', 'nowrap');
                       });
                       iLoop = iLoop + 1;
    
                   });
    Please help and let me know if the above code is the best practice on implementing a menu for the datatable.
    Last edited by ddadmin; 06-11-2015 at 11:46 PM.

  2. #2
    Join Date
    Jun 2015
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Please note that I'm using the updated flexmenu script in the below link (to show the menu onclick not onmouseover)

    http://www.dynamicdrive.com/forums/a...7&d=1433522534

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    all is working fine except when the menu show-up on upper direction it disappear immediately when moving the mouse to select item from the menu.
    This usually happens if you've initialized a flex menu more than once (by calling addflexmenu()). Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

  4. #4
    Join Date
    Jun 2015
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Please check the below fiddle: the menu will appear onclick for each td:

    http://fiddle.jshell.net/mhussein/sbbrg6ew/

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ok, after playing around with your fiddle for a while, the following seems to fix the problem. Find the below line inside flexdropdown.js:

    Code:
    		$menu.bind('mouseenter', function(){
    			clearTimeout($menu.data('timers').hidetimer)
    		})
    and change that to:

    Code:
    		$menu.bind('mouseenter mouseover', function(){
    			clearTimeout($menu.data('timers').hidetimer)
    		})
    DD Admin

Similar Threads

  1. How to change the flexmenu from onmouseover to onclick
    By mhussein in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 06-05-2015, 06:44 PM
  2. Using flexmenu with Knockout js
    By ojm37a in forum JavaScript
    Replies: 2
    Last Post: 05-22-2015, 02:21 PM
  3. jquery problem
    By cristopher in forum JavaScript
    Replies: 0
    Last Post: 07-12-2012, 11:55 AM
  4. Replies: 0
    Last Post: 08-21-2008, 10:33 AM
  5. Replies: 0
    Last Post: 08-21-2008, 06:43 AM

Bookmarks

Posting Permissions

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