1
I'm making a menu with drop-down sublinks.
The sublinks appear using DIV tags. On mouseover, a javascript function toggles the DIV blocks CSS display property.
It works fine.
The problem is, the sublinks appear as soon as the mouse is over the main link.
I want to introduce a delay, of say three seconds, before the sub-links are revealed.
I know I could use the javascript function setTimeout() to run a function (i.e drop-down) after a set interval.
However, I need to check that the mouse is STILL over the link before running the routine after 3 secs. make sense?
otherwise, someone can mouse over the link, go somewhere else, and the link reveals itself after three seconds. I need to check the element/link still has the mouseover focus.
and hence my question:
*** Is is possible to check for the mouseover focus of a link using javascript? ***
Ideally, If the element still has focus after 3 seconds, the menu sub-links will be revealed