var mark2=true;if(mark2){ move(1); mark2=false;} function move(){ $(".box").animate({ width: arrW[index], height: arrH[index], opacity: arrO[index], left: arrL[index], top: arrT[index] },500,function(){ mark2=true; })}以上代碼執行move(1); mark2=false;這兩句的時候,move函數中用了animate動畫函數,那move的調用是屬于異步的嗎?也就是放到任務隊列中執行嗎,所以首先執行mark2=false;這樣理解對嗎?
jQuery中的animate函數算異步執行嗎?
瀟湘沐
2018-10-16 17:17:55