PDA

View Full Version : Javascript Menu Issues



Zippy
15 Jul 2007, 06:55 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.