-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanimation.min.js
More file actions
7 lines (7 loc) · 1.8 KB
/
Copy pathanimation.min.js
File metadata and controls
7 lines (7 loc) · 1.8 KB
1
2
3
4
5
6
7
/*
* Animation.js v1.0.2 Copyright (c) 2013
* License: MIT
* Author: Roll
* http://github.com/rollRoll/Animation.js
*/
;(function(j,f,k,g){var e,l,m,n=k.createElement("div");e={timeCls:"animated",isIE:f.R&&f.RnB&&R.Util?R.Util.isIE:function(){var a=e.isIE,b;if(a.version!==g)b=a.version;else{b=3;var c,d;if(/Mozilla\/5.0 \(compatible\; MSIE 10(.+)/.test(f.navigator.userAgent))b=10;else{c=k.createElement("div");for(d=c.getElementsByTagName("i");c.innerHTML="\x3c!--[if gt IE "+ ++b+"]><i></i><![endif]--\x3e",d[0];);b=4<b?b:!1}}a.version=b;return a.version},getVendorPrefix:function(a){a=a||"Animation";var b=e.getVendorPrefix,c=a.toLowerCase();if(b.prefix!==g)a=b.prefix;else a:{a=[c,"Moz"+a,"Webkit"+a,"ms"+a,"O"+a];for(var c=RegExp("(.+)"+c,"i"),d=0,h=a.length;d<h;d++)if(n.style[a[d]]!==g){a=(a=a[d].match(c))?a[1].toLowerCase():"";break a}a=!1}b.prefix=a;return b.prefix},prefixed:function(a){var b=e.getVendorPrefix();return b?b+a:a.toLowerCase()},on:function(a,b,c){b=e.prefixed(b);a.one(b,c);m&&a.trigger(b)},off:function(a,b,c){b=e.prefixed(b);c&&a.trigger(b);a.off(b)},animateIn:function(a,b,c,d,h){var f=(null===d?"":d||e.timeCls)+" "+b;a.offAnimationEnd(!0);a.show().addClass(f);a.onAnimationEnd(function(b){!1!==h&&a.removeClass(f);c&&c(b)});return a},animateOut:function(a,b,c,d){var f=(null===d?"":d||e.timeCls)+" "+b;a.addClass(f);a.onAnimationEnd(function(b){a.hide().removeClass(f);c&&c(b)});return a},animate:function(a,b,c,d){b=[b,c].concat(Array.prototype.slice.call(d));return this["in"===a?"animateIn":"animateOut"].apply(this,b)}};m=(l=e.isIE())&&10>l;j.fn.extend({onAnimationEnd:function(a){return e.on(this,"AnimationEnd",a)},offAnimationEnd:function(a){return e.off(this,"AnimationEnd",a)}});f.Animation=e;j.isFunction(f.define)&&define.amd&&define("Animation",[],function(){return e})})($,this,this.document);