...

View Full Version : Javascript Menu Issues



Zippy
07-16-2007, 04: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">
<!--
window.onload=dropdown;

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';}
}
//-->
</script>


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.

twodayslate
07-16-2007, 04:45 PM
Like this?
http://cssplay.co.uk/menus/simple_vertical_centered.html

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

Zippy
07-16-2007, 04: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum