I'm trying to set up a drop-down menu, but I really don't have any idea what I'm doing.
I've inserted the code below, but need to make it so that it works with several menu topics (products, services, etc - see below).
Is this code even close to what I need?
script language="JavaScript" type="text/javascript"> // showMenu function goes here function showMenu() { document.getElementById('productsMenu').style.visibility = "visible"; document.getElementById('closer').style.visibility = "visible"; } // end function // hideMenu function goes here function hideMenu() { document.getElementById('productsMenu').style.visibility = "hidden"; document.getElementById('closer').style.visibility = "hidden"; } // end function </script> </head>
My navigation bar:
<div id="navBar"> <ul> <li><a href="#">home</a></li> <li><a href="#" onmouseover="showMenu()">products</a></li> <li><a href="#" onmouseover="showMenu()">services</a></li> <li><a href="#" onmouseover="showMenu()">locations</a></li> <li><a href="#" onmouseover="showMenu()">about us</a></li> <li><a href="#" onmouseover="showMenu()">contact</a></li> </ul> </div>