var timer = null;
var b=0,c=400,d=100,t=0;
var drag = $("drag");
function run() {
drag.style.left = Math.ceil(Tween.Circ.easeInOut(t,b,c,d)) + "px";
if(t<d){
t++;
}else{
clearInterval(timer);
}
}
var timer = setInterval(run, 20);
您可能感兴趣的文章: