WordPress/wp-includes/js/jquery/ui/effect-bounce.min.js

11 lines
1.2 KiB
JavaScript

/*!
* jQuery UI Effects Bounce 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/bounce-effect/
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery","./effect"],e):e(jQuery)}(function(v){return v.effects.effect.bounce=function(e,t){var i,o,f,c=v(this),n=["position","top","bottom","left","right","height","width"],a=v.effects.setMode(c,e.mode||"effect"),s="hide"===a,p="show"===a,u=e.direction||"up",r=e.distance,d=e.times||5,h=2*d+(p||s?1:0),m=e.duration/h,y=e.easing,l="up"===u||"down"===u?"top":"left",g="up"===u||"left"===u,w=c.queue(),q=w.length;for((p||s)&&n.push("opacity"),v.effects.save(c,n),c.show(),v.effects.createWrapper(c),r=r||c["top"==l?"outerHeight":"outerWidth"]()/3,p&&((f={opacity:1})[l]=0,c.css("opacity",0).css(l,g?2*-r:2*r).animate(f,m,y)),s&&(r/=Math.pow(2,d-1)),i=(f={})[l]=0;i<d;i++)(o={})[l]=(g?"-=":"+=")+r,c.animate(o,m,y).animate(f,m,y),r=s?2*r:r/2;s&&((o={opacity:0})[l]=(g?"-=":"+=")+r,c.animate(o,m,y)),c.queue(function(){s&&c.hide(),v.effects.restore(c,n),v.effects.removeWrapper(c),t()}),1<q&&w.splice.apply(w,[1,0].concat(w.splice(q,1+h))),c.dequeue()}});