Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript Menu Issues

    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:

    Code:
    <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.

  • #2
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    Like this?
    http://cssplay.co.uk/menus/simple_ve..._centered.html

    No javascript required, all CSS and HTML. Much more user friendly. I recommend using this instead of js.
    Last edited by twodayslate; 07-16-2007 at 05:29 PM.
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • #3
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •