joined:Sept 30, 2009
I am using a menu that expands/collapses in response to the user's mouse. The menu is initially collapsed but when the user mouses over it expands to full size. However, if the user removes the mouse from the menu, then after 500-ms, the menu shrinks back down to the collapsed size.
My problem is, if the user removes the mouse, returns the mouse, removes the mouse, etc, then the menu seems to stay open longer than the 500-ms from when the user last removed the mouse.
Is there a way to fix this? I've tried to clear the timer whenever the menu is in any transition, but it doesn't seem to work.
<div id="menu" onmouseover="menuOpen()" onmouseout="menuBlur()">...</div>
menuTimer = setTimeout("menuClose()", 500);}