jq清空动画分两种情况
1 类似这种
$(document).ready(function(){
$("#start").click(function(){
$("div").animate({
height:300,
width:300,
opacity:.4,
marginLeft:20
},1500);
});
$("#stop").click(function(){
//重点来了
$("div").stop();
});
});
2 还有这种
$(document).ready(function(){
$("#start").click(function(){ //队列动画
$("div").animate({height:300},1500)
.animate({width:300},1500)
.animate({height:100},1500)
.animate({opacity:100},1500);
});
$("#stop").click(function(){
//重点来了
$("div").stop(true,false);
});
});