...

View Full Version : mouseover menu



ebco
07-05-2002, 02:57 PM
what is the idea behind hidding menu on settimeout?

This question related to navigation menu

ACJavascript
07-06-2002, 04:58 AM
Could you explain that a little more, i don't really understand you question :D:D

ebco
07-06-2002, 06:29 AM
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

ACJavascript
07-06-2002, 06:44 AM
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 :D:D:D

Or am i way off the mark?

premshree
07-06-2002, 10:06 PM
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.

adios
07-07-2002, 01:06 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum