首页 > > > jQuery中的animate函数算异步执行吗?
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;这样理解对吗?
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4479/viewspace-3151226/ ,如需转载,请注明出处,否则将追究法律责任。