lets call it a menu bar with menu-items and sub-menus.
This is not functional code
Code:
menu-item.onmouseover = function(){
//clear last sub-menu if there was one
clearTimeout(menu.timeout); //make sure no problems occur
hide last sub-menu //hide the menu <-- you code all :)
//set timeout to display menu (unless navigated to sub-menu. See below)
menu.timeout = setTimeout(displayThis(),500);
}
menu-item.onmouseout = function(){
//set timeout to close menu (unless navigated to sub-menu. See below). This will close the menu if the user does not navigate to the sub-menu
menu.timeout = setTimeout(closeThis(),500);
}
menu-item.sub-menu.onmouseover = function(){
//clear timeout of sub-menu
clearTimeout(menu.timeout); //stop sub menu from disappearing
}
Bookmarks