Home > Web Front-end > JS Tutorial > Several uses of jquery stop animation stop

Several uses of jquery stop animation stop

巴扎黑
Release: 2017-06-30 11:31:25
Original
1700 people have browsed it


<!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:
Copy after login
    $("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>
Copy after login

The above is the detailed content of Several uses of jquery stop animation stop. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template