美文网首页
jquery 动画队列 停止动画

jquery 动画队列 停止动画

作者: 程序猿的小生活 | 来源:发表于2022-07-07 10:49 被阅读0次
<html>
    <head>
        <script src="js/jquery.js"></script>
        <meta charset="utf-8">
        <title>动画队列</title>
    </head>
    <body>
        <button id="startan">开始动画</button>
        <button id="stopan">停止动画</button>
        <div  id="app" style="width: 100px;height: 100px;display: none;background-color: pink;"></div>
    </body>
    <script>
        
        $(function(){
            //模拟动画队列
            $("#startan").click(function(){
                $("#app").slideDown(2000).slideUp(2000)
            })
            //停止动画执行stop方法
            //stop两个参数 1.是否清除队列 2.是否跳转最终效果
            $("#stopan").click(function(){
                //$("#app").stop(true,true);
                //$("#app").stop(true,false);
                //$("#app").stop(false,false);
                $("#app").stop(false,true);
                //$("#app").stop();
            })
        })
    </script>
</html>

相关文章

  • animate

    jquery动画 显示与隐藏 淡入与淡出 滑动 停止动画 自定义动画 动画队列,将多组动画按顺序播放

  • jquery 动画队列 停止动画

  • jQuery 动画队列

    jQuery 动画队列 动画队列的方法: 我们知道jQuery提供了以下几种方法来操作动画队列: stop([cl...

  • jQuery动画队列

    jQuery 动画队列 当在jQuery对象上调用动画方法时,如果对象正在执行某个动画效果,那么新调用的动画方法就...

  • 动画队列

    jQuery提供了以下几种方法来操作动画队列。stop([clearQuery],[gotoEnd]):停止当前j...

  • 2018-09-27 动画队列

    jQuery提供了以下几种方法来操作动画队列。stop([clearQuery],[gotoEnd]):停止当前j...

  • jQuery动画队列

    什么是动画队列? jQuery动画存在一个队列, 会把事件产生的动画 放在一个队列中,当来不及执行这些事件队列的时...

  • jQuery动画队列

    队列实现是jQuery非常棒的一个拓展,使用动画队列可以使动画更容易实现。 .animate( propertie...

  • JQuery动画队列

    动画队列 当在jQuery对象上调用动画方法时,如果对象正在执行某个动画效果,那么新调用的动画方法就会被添加到动画...

  • jQuery动画队列

    队列 队列的本质是一个数组,对队列的理解先从数组的push和shift开始。push是从数组尾端插入新的元素,sh...

网友评论

      本文标题:jquery 动画队列 停止动画

      本文链接:https://www.haomeiwen.com/subject/owrybrtx.html