相信很多人在写jQuery动画时肯定遇到动画积累的问题,现在我这里就是用stop()方法解决这个问题。
<script language="JavaScript">
$("#panel").hover(function(){
$(this).stop().animate({height:"200",width:"300"},200);
},function(){
$(this).stop().animate({height:"100",width:"100"},300);
});
</script>