Results 1 to 2 of 2

Thread: Floating Menu

  1. #1
    Join Date
    Sep 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Floating Menu

    hi friends,

    i was keep on trying to float a menu with number of submenus but couldn't able to achieve my target.

    when ever the mouseover comes to submenu its getting disappeared(thi\s is my problem)

    can any help me to floatmenu with submenu's using javascript

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Generally that problem is solved in menus by assigning the same onmouseover event to the sub as to the menu that opens it. Usually this needs to be combined with having the onmouseout event that makes the sub disappear be setTimeout delayed and having the mouseover event first clear that time out, general examples -

    trigger & sub onmouseover:

    Code:
    function showsub(subobj){
    subobj=subobj;
    if(hiding)
    clearTimeout(hiding);
    subobj.style.display='block';
    }
    trigger and sub onmouseout:

    Code:
    function hidesub(){
    hiding=setTimeout("subobj.style.display='none'", 60);
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •