-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjquery.animateCSS.min.js
8 lines (8 loc) · 1.1 KB
/
jquery.animateCSS.min.js
1
2
3
4
5
6
7
8
//
// jquery.animateCSS.js - A micro-plugin for using Animate.css with jQuery.
//
// Developed by Cory LaViska for A Beautiful Site, LLC
//
// Licensed under the MIT license: http://opensource.org/licenses/MIT
//
jQuery&&function(n){"use strict";function t(t,i){var a="animationend mozAnimationEnd MSAnimationEnd oanimationend webkitAnimationEnd";n(t).addClass("animated "+i.animation).on(a,function(){n(this).off(a),n(t).removeClass("animated "+i.animation),i.complete.call(t)})}n.extend(n.fn,{animateCSS:function(i){var a={};return"object"==typeof arguments[1]?a=arguments[1]:"function"==typeof arguments[1]?a.complete=arguments[1]:"number"==typeof arguments[1]&&(a.duration=arguments[1],"function"==typeof arguments[2]&&(a.complete=arguments[2])),a=n.extend(!0,{animation:i,complete:function(){},delay:0,duration:1e3},a),n(this).each(function(){var i=this;a.duration&&n(i).css({"-moz-animation-duration":a.duration+"ms","-o-animation-duration":a.duration+"ms","-webkit-animation-duration":a.duration+"ms","animation-duration":a.duration+"ms"}),a.delay<=0?t(i,a):setTimeout(function(){t(i,a)},a.delay)}),this}})}(jQuery);