开发者

How to kill .animate() after the user hovers off?

Code:

//create the animation.
  $('img#header').hover(function(){
  $(this).animate({"top": "-10px" }, "slow");

I am trying to have the hover stop and go back t开发者_如何学编程o normal when the user hovers off the image. I got the animation working, just not when I hover off. Any help?


$('img#header').hover(function()
{
    $(this).animate({"top": "-10px" }, "slow");
}, function()
{
    $(this).animate({"top": "0"}, "slow");
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜