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

  • Home
  • SEARCH
  • 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 6725719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:50:27+00:00 2026-05-26T09:50:27+00:00

I have certain div in the page and I need to do this: When

  • 0

I have certain div in the page and I need to do this:

When the user mouse stands on the div for 2 seconds without moving out, then an alert will show

I came here because I don’t really know where to start, what to do, how to make it.

I searched on the web but I got no results. Any tutorial, resources, guide or example would be great.

  • 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-26T09:50:28+00:00Added an answer on May 26, 2026 at 9:50 am

    When hovering over the element, use setTimeout to request an alert box, with a delay of 2000 milliseconds (2 seconds). Reset the timer using clearTimeout and setTimeout when the user moves the mouse.

    Example, Fiddle: http://jsfiddle.net/6SyLb/1/

    var div = document.getElementById("thediv");
    function alerter(){
        alert("Test")
        timer = setTimeout(alerter, 2000);
    }
    var timer;
    div.onmousemove = function(){
        clearTimeout(timer);
        timer = setTimeout(alerter, 2000)
    };
    div.onmouseover= function(){
        clearTimeout(timer);
        timer = setTimeout(alerter, 2000)
    }
    div.onmouseout = function(){
        clearTimeout(timer);
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following tabs on certain div on my page: (this code is
I have a div with is replaced upon certain user actions. These actions are
I need a user to navigate to a certain page that has a certain
I have a little issue concerning an animation-effect which loads a certain div into
I have certain panels on my page that are hidden under certain circumstances. For
I have a page with a form where I need to grab all the
I have a dropdown function that I need to work only on the div
I have several divs with one class on a page. <div class=main/> <div class=main/>
I have a page where I need to add a drag and drop functionality
I have a very simply problem where I need a div to expand to

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.