Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6586251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:46:03+00:00 2026-05-25T16:46:03+00:00

Stick with me, I’m dealing with pre-existing code and trying to not have to

  • 0

Stick with me, I’m dealing with pre-existing code and trying to not have to overhaul code.

I’m dealing with a rollover popup menu that needs a 500ms delay for the popup. Done in crazy CSS hacking as such:

#nav ul li ul {
  left: -9999999px;
}

#nav ul :hover ul {
  left: auto;
}   

<div id="nav">
   <ul>
     <li>Link here</li>
     <ul>Some popup content</ul>
   </ul>
</div>

So I killed the “#nav ul :hover ul” CSS definition and wrote a basic one-liner in jQuery

$("#nav ul li").live("mouseover", function () {$(this).children("ul").css("left", "auto"); return false})

Which emulates the original code, essentially, except now under JS control

So then I logically, to add the delay, started messing around with setTimeout

$("#nav ul li").live("mouseover", function () {setTimeout(function() {$(this).children("ul").css("left", "auto");} return false}, 500))

Plus, many other combinations. It seems to be a pain in the ass to send $(this) through setTimeout. I tried researching .delay(), but it seems to only be good for effects queues, and I’m not sure how nicely I can integrate an effects queue into this to make everything look nice. So any help would be appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:46:04+00:00Added an answer on May 25, 2026 at 4:46 pm

    See this jsfiddle.

    http://jsfiddle.net/wHBK8/1/

    I had to use display: none instead of the left method for jsfiddle as it wouldn’t apply the left.

    Also, your inner ul wasn’t within the li as specified in the css.

    Here is how to pass this as referenced in the mouseover to setTimeout.

    $("#nav ul li").live("mouseover", function () {
        var that= $(this);
        setTimeout(function() {that.children("ul").show();}, 5000);
        return false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If you stick to managed code and standard coding (nothing that does unconventional things
I've been trying to stick a PApplet in a JFrame and have it resize
I have a .NET console app that reads info from a USB stick and
I have been trying to stick to the TDD approach. So I have made
I have a 'back button' that I would like to stick to the header
Trying to draw a basic stick man in html 5 css that walks. If
I have a header that I want to stick to the top and a
Should I stick with Sun's Java code conventions for PHP code?
I am trying to stick to the practice of keeping the database normalized, but
I do not use C++ much (I try to stick to the easier stuff

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.