bender78
10-15-2003, 11:49 AM
I recently found this nice javascript menu :
http://www.siteexperts.com/tips/jperry/ts02/page1.asp
I do however miss one thing, when the user first moves the cursor over a menu-item the sub-menu appears but when the user moves the cursor out of the menu area the sub-menu still is shown.
I was thinking of adding a 'hide' function and implementing it on onmouseout event.
Something like this :
<DIV ID="d1" onmouseout="hide(this,ds1);" onmouseover="show(this,ds1);" class="menu">JavaScript</DIV>
<DIV ID="ds1" onmouseout="hide(this,ds1);" CLASS="submenu" STYLE="display:none">
The hide function need to check whether the cursor actually moves out of the menu-area (that includes both menu-item and sub-menu) and not only moves from d1 to ds1.
Would appreciate some help here. My javascript experience is rather limited Im afraid.
http://www.siteexperts.com/tips/jperry/ts02/page1.asp
I do however miss one thing, when the user first moves the cursor over a menu-item the sub-menu appears but when the user moves the cursor out of the menu area the sub-menu still is shown.
I was thinking of adding a 'hide' function and implementing it on onmouseout event.
Something like this :
<DIV ID="d1" onmouseout="hide(this,ds1);" onmouseover="show(this,ds1);" class="menu">JavaScript</DIV>
<DIV ID="ds1" onmouseout="hide(this,ds1);" CLASS="submenu" STYLE="display:none">
The hide function need to check whether the cursor actually moves out of the menu-area (that includes both menu-item and sub-menu) and not only moves from d1 to ds1.
Would appreciate some help here. My javascript experience is rather limited Im afraid.