Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: mouseover menu

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    156
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mouseover menu

    what is the idea behind hidding menu on settimeout?

    This question related to navigation menu

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Could you explain that a little more, i don't really understand you question
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    156
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what i normally do for mouseover navigation is putting blank layers so that when person mouse over on it menu hides

    now what i want is i want menu hide on basis of settime out

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you can do that in a couple of ways.

    1) By Using Time -- count downs and count ups

    2) by using arrays

    like:
    var c="0"

    function go(){
    var a = new Array()
    a[1]="hidden"
    a[2]="hidden"
    a[3]="visible"
    a[4]="visible"

    c=(c==4)?1:++c

    document.all.mylayer.style.visibility=a[c]

    setTimeout("go()",100)
    }


    Hope this has helped

    Or am i way off the mark?
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mumbai, India
    Posts
    218
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think, you are talking about a simple layer-based navigation menu. As long as your mouse is over the link that shows the menu, the menu will be visible. The idea behind using setTimeout() is to make the menu visible for some time before it hides onMouseout.

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    The general idea behind that is this: a mouseout event will always be fired first when the mouse leaves a menu element; then, assuming you've moved to another element (still over the menu, i.e.) a mouseover will fire on the new element. Obviously, you need to reverse the order of these events if you want to use the over (still over the menu) to cancel the result of an out (hiding the menu). A timer delay does this, giving you a sufficient period to clearTimeout() and cancel the mouseout action. It also can allow for user navigation between non-contiguous (separated) menu panels. Generally it can help to avoid hyper-active, 'flickering' menu systems.


  •  

    Posting Permissions

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