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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2008
    Posts
    682
    Thanks
    114
    Thanked 2 Times in 2 Posts

    Changing var delay hide amount

    This is from a js submenus script and I'm wanting to know how to make it so that it won't disappear until you click another menu.

    //Set delay before submenu disappears after mouse moves out of it (in milliseconds)
    var delay_hide=500

  2. #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,971
    Thanks
    211
    Thanked 2,629 Times in 2,607 Posts
    You don't give much detail, but:-

    var tim; // tim must be global

    the mouseout function

    tim = setTimeout("obj.style.visibility=\'hidden\';",500); // 500 milliseconds delay

    the mouseover function

    clearTimeout(tim);


 

Posting Permissions

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