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 關注
- 539 瀏覽
添加回答
舉報
0/150
提交
取消