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 5967471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:56:57+00:00 2026-05-22T19:56:57+00:00

I have this routine which is called onmouseover of a certain element. I want

  • 0

I have this routine which is called onmouseover of a certain element. I want there to be a slight delay – i.e. give the user time to mouseout before the effect takes place. The effect uses the event.clientX value. However it appears that by the time the callback is called – after 500ms – the event object no longer exists. How can I neatly persist the state of event.clientX?

function showTip(sDivID){
    SHOW_TIP_TIMEOUT_ID = setTimeout(function(){
        var div = $('#'+sDivID).show()[0];
        div.style.left = event.clientX;
    } ,500)
}
  • 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-22T19:56:58+00:00Added an answer on May 22, 2026 at 7:56 pm

    If you’re relying on this only working in Internet Explorer, you can just save the value before setting up the timeout:

    function showTip(sDivID) {
      var x = event.clientX;
      SHOW_TIP_TIMEOUT_ID = setTimeout(function() {
        var div = $('#' + sDivId).show()[0];
        div.style.left = x;
      }, 500);
    }
    

    If you want this to work for other browsers, you’ll have to grab the event in the event handler itself and either pass it around or else stash it in a global (ick). Since you’re using jQuery, it already does all the browser normalization work for you, so you should take advantage of that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an element called link which I need to check. Currently I'm doing
I have this routine that works well, but it messes up as it counts
I have an ArrayList of Routine objects and I must use this method to
I have a routine that examines thousands of records looking for discrepancies. This can
I have this string 2012-06-27 16:17:06 and I want to convert it to GMT
I have this form, in which i need to populate a combo box with
I have an upload routine which is working for servlets. Now I was trying
There is an Arduino library called 'ByteBuffer' (found here ), which is a circular
I have a class called GUIMain which registers, creates, and shows a main window
I have a new MVC3 project with one Controller called PublicController.cs which contains 4

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.