0

I have li boxes that make this jQuery call when an end user hovers on them with his cursor:

$('.boxgrid.slidedown').hover(function(){
         $(".cover", this).stop().animate({top:'-150px'},{queue:false,duration:300});
        }, function() {
            $(".cover", this).stop().animate({top:'4px'},{queue:false,duration:300});
        });

Now i want to wait half a second after the user points his cursor so i could stall the slidedown effect. if the mouse is still hovering then the slidedown will continue, if not then nothing should happen.

i tried using settimeout() without any luck. thank you.

Tom
  • 8,775
  • 24
  • 84
  • 144
  • 2
    Maybe this helps: http://cherne.net/brian/resources/jquery.hoverIntent.html – m90 Mar 28 '12 at 14:05
  • There's another post that is asking something similar http://stackoverflow.com/questions/1273566/how-do-i-check-if-the-mouse-is-over-an-element-in-jquery – Namat Mar 28 '12 at 14:08

1 Answers1

2

There is a plugin for that, I think...

http://cherne.net/brian/resources/jquery.hoverIntent.html

superUntitled
  • 21,855
  • 29
  • 82
  • 108