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

9 lines
965 B
JavaScript
Raw Normal View History

/*!
* jQuery UI Effects Bounce 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(l){return l.effects.define("bounce",function(e,t){var i,n,o=l(this),f=e.mode,a="hide"===f,f="show"===f,c=e.direction||"up",u=e.distance,s=e.times||5,d=2*s+(f||a?1:0),r=e.duration/d,p=e.easing,h="up"===c||"down"===c?"top":"left",m="up"===c||"left"===c,y=0,e=o.queue().length;for(l.effects.createPlaceholder(o),c=o.css(h),u=u||o["top"==h?"outerHeight":"outerWidth"]()/3,f&&((n={opacity:1})[h]=c,o.css("opacity",0).css(h,m?2*-u:2*u).animate(n,r,p)),a&&(u/=Math.pow(2,s-1)),(n={})[h]=c;y<s;y++)(i={})[h]=(m?"-=":"+=")+u,o.animate(i,r,p).animate(n,r,p),u=a?2*u:u/2;a&&((i={opacity:0})[h]=(m?"-=":"+=")+u,o.animate(i,r,p)),o.queue(t),l.effects.unshift(o,e,1+d)})});