View Full Version : Javascript Menu Issues

07-16-2007, 05:22 PM
Well, my site is here http://platinum-cube.com. As you can see, I'm using a javascript controlled menu. The <script> controlling this is:

<script type="text/javascript">

function dropdown(id) {

var d = document.getElementById(id);
for (var i = 1; i<=10; i++) {
if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
if (d) {d.style.display='block';}

I was wondering, is it possible to have this same working dropdown menu? Except when you hover over it, it disappears a couple seconds after you're mouse is no longer on it? I would appreciate if someone could help me come up with something like this, and I'm not real good with javascript.

07-16-2007, 05:45 PM
Like this?

No javascript required, all CSS and HTML. Much more user friendly. I recommend using this instead of js.

07-16-2007, 05:54 PM
Well, I'm still gonna use what we have now, all I want is the menu to go away when the mouse is not over it.