87,921
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
$(document).ready(function(){
$("#start").click(function(){
if($("#box:animated").length==0)
{
$("#box").animate({height:300},"slow");
$("#box").animate({width:300},"slow");
$("#box").animate({height:100},"slow");
$("#box").animate({width:100},"slow");
}
});
});
</script>
$("#button").click(function() {
if(!$("#div:animate")) {
$("#div").animate();
}
}
<html>
<head>
<script type="text/javascript" src="http://www.wanmei.com/public/js/jq_132.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#start").click(function(){
$("#box").animate({height:300,queue:true},"slow");
$("#box").animate({width:300,queue:true},"slow");
$("#box").animate({height:100,queue:true},"slow");
$("#box").animate({width:100,queue:true},"slow");
});
});
</script>
</head>
<body>
<p><a href="#" id="start">Start Animation</a></p>
<div id="box"
style="background:#98bf21;height:100px;width:100px;position:relative">
</div>
</body>
</html>