开发者

jquery Hover bug

I'm trying to write a piece of Jquery that will change something whe开发者_如何学运维n the user hovers on/hover off a div.

However if i hover off the div during the animation the hover on animation the off animation does not work

$('.boxgrid').hover(function(){
    $(".cover", this).stop().delay(1000).animate({top:'80px'},{queue:true,duration:500});
}, function() {
    $(".cover").stop().animate({top:'130px'},{queue:false,duration:0});
});

Am I doing anything wrong?

Thanks in advance.


Try changing your .stop()'s to .stop(true, true).


http://jsfiddle.net/CKrPF/ - does this not work correctly?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜