Results 1 to 3 of 3

Thread: CSS menu - mouseout delay

  1. #1
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS menu - mouseout delay

    I really like this css menu:
    http://qrayg.com/learn/code/cssmenus
    But it is really annoying when menu immediatelly disappear on onmouseout.
    Could you please help to add a delay before hide menu?
    Thanks
    genkiz

  2. #2
    Join Date
    Aug 2004
    Posts
    9,894
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    That script is based on Suckerfish, which is basically a pure CSS menu (aided only by JavaScript to make it cross browser compatible). I'm not aware of any existing mods online that give Suckerfish a delay onmouseout unfortunately.

  3. #3
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by genkiz View Post
    I really like this css menu:
    http://qrayg.com/learn/code/cssmenus
    But it is really annoying when menu immediatelly disappear on onmouseout.
    Could you please help to add a delay before hide menu?
    Thanks
    genkiz
    You can do it via javascript, not really a CSS thing.

    Perhaps something like:

    Code:
    <script type="text/javascript"><!--
    function hideDiv() {
    document.getElementById("someLayer").style.visibil ity="hidden";
    }
    //--></script>
    
    <span id="someLayer" style="visibility: hidden" onmouseover="this.style.visibility='visible';" onmouseout="javascript:setTimeout(hideDiv, 3000);">
    Note: the 3000 in the setTimeout() means 3 secs.

Bookmarks

Posting Permissions

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