1
davidthomas1
help wanted with javascript mouseover question

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

Login

Who's Online

499 user(s) are online (52 user(s) are browsing Support Forums)


Members: 0


Guests: 499


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits