Results 1 to 7 of 7

Thread: ddlevelmenu - menu hides when it should stay shown

  1. #1
    Join Date
    Nov 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question ddlevelmenu - menu hides when it should stay shown

    1) Script Title: ddlevelsmenu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/

    3) Describe problem:
    when you open a sublevel menu and move the mouse out of the menu it closes, fine.
    but if the next level menu up is still shown, due to the timeout, and you move the mouse back over it then that menu should stay visible but instead hides when the timeout finishes.

    is there a way to clear/reset the timeout when you move back over a visible menu?

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

    Default

    It should behave this way by default already- cancel the hide timeout if the mouse moves back over a sub menu while it's still visible after the mouse initially moves out of it. How long do you have the timeout value set to?
    DD Admin

  3. #3
    Join Date
    Nov 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    time-out is currently set to 1000.

    If I go through the menus, staying within the lines, then it all works fine.
    But if on the 3rd level menu you go out of the lines when going back to the 2nd level menu then the 3rd menu disappears instantly and the 2nd level will disappear after the time-out even though I am now within it's borders.

  4. #4
    Join Date
    Nov 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have found that if you leave the 3rd level menu and then return to the 2nd level , first leaving the menu completely, if you roll-over a menu item with a sub-menu then the time-out isn't reset and the menu will disappear, but if you roll-over a menu item without a sub-menu then the time-out is reset and the menu stays visible.

  5. #5
    Join Date
    Nov 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    A bit more investigation has found that:-

    it works in IE6
    if doesn't work in FF or Chrome or IE with Chrome Frame

    it appears the mouseover event for the <li> to open the submenu is causing the mouseover in the menu <div> to not fire.

  6. #6
    Join Date
    Nov 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    found the cause lines 191/2
    if (e.stopPropagation)
    e.stopPropagation()

    removing these lines solves the problem.

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

    Default

    Thanks for sharing your findings.
    DD Admin

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
  •