Jam*_*mes 1 jquery animation background colors
我正在使用颜色插件(链接到谷歌缓存,jquery.com目前关闭)来处理背景颜色动画.
$(".navigation a").hover(
function(){
$(this).stop().animate({backgroundColor: black});
},
function(){
$(this).stop().animate({backgroundColor: green});
$(this).hide();
}
);
Run Code Online (Sandbox Code Playgroud)
动画结束时需要隐藏当前链接.现在它立刻隐藏起来了mouseout()
.
解决办法是什么?
您需要将其.hide()
置于调用的回调函数中.animate()
.
$(this).stop().animate(
{backgroundColor: green},
function() {
$(this).hide();
}
);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
74 次 |
最近记录: |