I have certain div in the page and I need to do this:
When the user mouse stands on the
divfor 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.
When hovering over the element, use
setTimeoutto request an alert box, with a delay of 2000 milliseconds (2 seconds). Reset the timer usingclearTimeoutandsetTimeoutwhen the user moves the mouse.Example, Fiddle: http://jsfiddle.net/6SyLb/1/