微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

jAnimate jQuery 插件

程序名称:jAnimate

授权协议: MIT

操作系统: 跨平台

开发语言: JavaScript

jAnimate 介绍

jAnimate 是一款帮助你在 jQuery 中使用 Animate.css 的插件。如果你想立刻中止动画效果,且保持该状态不变的话,推荐使用
jAnimate

示例:

<!DOCTYPE html>
<head>
  <Meta charset="utf-8">
  <title>janimate example</title>
  <link rel="stylesheet" href="https://cdn.rawgit.com/daneden/animate.css/master/animate.css">
</head>
<body>

  <h1>Hello jAnimate</h1>
  <button class="e1">swing</button>
  <button class="e2">shake</button>
  <button class="e3">fadeOut</button>
  <button class="e4">fadeIn</button>

  <script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
  <script src="https://cdn.rawgit.com/renatorib/janimate/master/dist/janimate.min.js"></script>
  <script type="text/javascript">
      $(document).ready(function(){

        $('.e1').click(function(){
          $('h1').jAnimateOnce('swing');
        });

        $('.e2').click(function(){
          $('h1').jAnimateOnce('shake');
        });

        $('.e3').click(function(){
          $('h1').jAnimate('fadeOut');
        });

        $('.e4').click(function(){
          $('h1').jAnimate('fadeIn', function(self, effect){
            alert(effect + ' finish');
          });
        });

      });
  </script>

</body>

jAnimate 官网

https://github.com/renatorib/janimate

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐