mouseleave:function(){$(this).stop(true).animate({ height: "0px"}, 100);$(this).animate({ height: "100px"}, 300).toggleClass("bg_blue");},我上代码,应该是动画执行完了,再设置蓝背景呀可是我发现,立马设成bg_blue了然再才是动画效果为啥没按顺序执行(应该和stop(true)无关)
1 回答

拉风的咖菲猫
TA贡献1995条经验 获得超2个赞
.animate( properties [, duration ] [, easing ] [, complete ] )
$(this).animate({ height: "100px"}, 300,function(){
$(this)..toggleClass("bg_blue");
})
- 1 回答
- 0 关注
- 517 浏览
添加回答
举报
0/150
提交
取消