Cross Browser Drop-down Menus
5. Hiding the menus
Test the following in Netscape 4.x:
The revised code is below:
We've added 2 more functions - menuOverTest and menuOutTest. menuOutTest is called every time the mouse leaves an element of the menus. It sets up a timer that closes all the menus after a small delay. menuOverTest is called when the mouse enters a menu element. This simply cancels the timer so the menus stay visible.
This extra code is only necessary for Netscape 4.x. All the other browsers I've tested the code on will respond to the document.onMouseover event.
|