码迷,mamicode.com
首页 > Web开发 > 详细

jQuery清除、停止队列中剩下(未执行的函数)

时间:2017-05-11 22:23:52      阅读:287      评论:0      收藏:0      [点我收藏+]

标签:function   html   tar   ack   stat   htm   har   cti   http   

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery清除、停止队列中剩下(未执行的函数)</title>
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
//clearQueue() 清除、停止队列中剩下(未执行的函数)
$(document).ready(function(){
$("#start").click(function(){ //队列动画
$("div").animate({height:300},1500);
$("div").animate({width:300},1500);
$("div").animate({height:100},1500);
$("div").animate({width:100},1500);
});
$("#stop").click(function(){
$("div").clearQueue();
});
});
</script>
</head>
<body>

<button id="start">开始动画</button>
<button id="stop">停止动画</button>
<br><br>
<div style="background:lightpink;height:100px;width:100px;">
</div>

</body>
</html>

jQuery清除、停止队列中剩下(未执行的函数)

标签:function   html   tar   ack   stat   htm   har   cti   http   

原文地址:http://www.cnblogs.com/YoogaChan/p/6842686.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!