[thelist] Getting Desperate...DIV onmouseout firing too soon..

Karl Bunyan freelance at core10.co.uk
Wed Jul 16 03:06:47 CDT 2003


> Hi all.  Please look at the navigation menu here:
> http://www.zunch.com/jltla  for reference.
> 
> It's under construction, WAY under construction.  The
> navigation menu i'm building is not working as intended.  The 
> onmouseout event, which is supposed to hide the submenu DIV 
> is firing as soon as the mouse leaves the any of the three 
> links.  It should only fire when the mouse leaves the entire area.

It's the event bubbling - mousing out from any active element inside the
div is causing the onmouseout event to fire for the div as a whole.
Rather than using onmouseout, I prefer to place a larger transparent div
under the submenu (so that it completely surrounds it) and detect the
mouseover event on that. You should be able to use the same div to close
all of your submenus as well.

Karl

Core 10
t. 020 7242 1689
m. 07947 133 778
http://www.core10.co.uk
Internet development and hosting services



More information about the thelist mailing list