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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:42:23+00:00 2026-05-23T20:42:23+00:00

I am trying to have a window display when the mouse is hovered over

  • 0

I am trying to have a window display when the mouse is hovered over an image for 2 seconds or more, of course if the user does not hover for at least 2 seconds I do not want the window to be displayed.

Below is a snippet of the code that I used. As the code is now the window shows up at two seconds regardless of how long the user hovered over the image. I am trying to get something similar to the delayed hover effect in Netflix. I am sure I am going about it all wrong. So thanks in advance for your help.

<img name="img4" onMouseOver="WindowDelay(this);" onmouseout="closeDetails();" 
        src="images/MyImage.jpg" height="240" width="166"/>

<script language="JavaScript" type="text/javascript">
       var countTime = 0;
       var windowTimer = null

       function WindowDelay(thatImg)
       {
            windowTimer = window.setInterval(function() {countT(thatImg);}, 1000);
       }   

       function countT(thatImg)
       {
            countTime++;

            if (countTime == 2)
            {
                openDetails(thatImg);
                clearInterval(windowTimer);
                countTime = 0;
            }

        }
</script> 
  • 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-23T20:42:23+00:00Added an answer on May 23, 2026 at 8:42 pm

    When the mouse goes over the element, use setTimeout to open the window in two seconds. If the user mouses off of the element, use clearTimeout to stop the future window opening.

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

Sidebar

Related Questions

I am trying to trigger a mouse over drop down window in Watir on
I'm trying to display a tooltip when mouse hovers over a disabled control. Since
I am trying to have a pop up window display results in a table
I am trying to have a window open and have it display the text
I have my own textbox which inherits System.Windows.Forms.TextBox I am trying to display texts
So I'm trying to have a window that I can drag around by the
I have other-window.xaml file and trying to open this from window.xaml on button click.
I have a window with the following elements, and I'm trying to access the
I'm trying to hide window after its startup. I have own window-class which is
Currently, I'm trying to have a top-level window in Windows Forms with a custom

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.