<!doctype html public
>
<html xmlns=>
<head>
<meta http-equiv= content=/>
<title>panel</title>
<style type=>
*--height: %--</style>
<script src= type=></script>
<script type=>).animate({height: }, ).animate({width:).hide().animate({height:, width:, opacity: }, ).animate({height:
$(button:eq(1)).click(function(){
$(#panel).stop();//停止当前动画,继续下一个动画 });
$(button:eq(2)).click(function(){
$(#panel).stop(true);//清除元素的所有动画 });
$(button:eq(3)).click(function(){
$(#panel).stop(false, true);//让当前动画直接到达末状态 ,继续下一个动画 });
$(button:eq(4)).click(function(){
$(#panel).stop(true, true);//清除元素的所有动画,让当前动画直接到达末状态 });
})</script>
</head>
<body>
<button>开始一连串动画</button>
<button>stop()</button>
<button>stop(true)</button>
<button>stop(false,true)</button>
<button>stop(true,true)</button>
<p id="panel">
<h5 class="head">什么是jquery?</h5>
<p class="content">
jquery是继prototype之后又一个优秀的javascript库,它是一个由 john resig 创建于2006年1月的开源项目。jquery凭借简洁的语法和跨平台的兼容性,极大地简化了javascript开发人员遍历html文档、操作dom、处理事件、执行动画和开发ajax。它独特而又优雅的代码风格改变了javascript程序员的设计思路和编写程序的方式。 </p>
</p>
</body>
</html>
以上就是jquery 停止动画 stop的几种用法的详细内容。
