9 Years
Discussion Span
Last Post by ebabes

This is done through javascript and visibility. You can also do it through CSS.

For javascript:
on your hyperlink add an onmouseover, onmouseout event(s) that call the specific function.

On that function, check to see if that submenu is visible. If it is, make it "hidden", if not, make it visible. An example of this is below:

<script type="text/javascript">
function showMenu(id) {
  id = document.getElementById(id);
  if (id.style.visibility == '' || id.style.visibility == 'block') {
    id.style.visibility = "hidden";
  } else {
    id.style.visibility = '';

<a href="#" onmouseover="showMenu('menuName')">Link</a>
<div id="menuName" onmouseout="showMenu('menuName')">link1<br />link2<br /></div>

Now this code is very simple, so you can expand off of it easily. This should just give you an example of where to go!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.