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

9 lines
994 B
JavaScript
Raw Normal View History

/*!
* jQuery UI Effects Fold 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(m){return m.effects.define("fold","hide",function(i,e){var t=m(this),n=i.mode,c="show"===n,n="hide"===n,f=i.size||15,o=/([0-9]+)%/.exec(f),s=!!i.horizFirst?["right","bottom"]:["bottom","right"],a=i.duration/2,l=m.effects.createPlaceholder(t),u=t.cssClip(),p={clip:m.extend({},u)},r={clip:m.extend({},u)},d=[u[s[0]],u[s[1]]],h=t.queue().length;o&&(f=parseInt(o[1],10)/100*d[n?0:1]),p.clip[s[0]]=f,r.clip[s[0]]=f,r.clip[s[1]]=0,c&&(t.cssClip(r.clip),l&&l.css(m.effects.clipToBox(r)),r.clip=u),t.queue(function(e){l&&l.animate(m.effects.clipToBox(p),a,i.easing).animate(m.effects.clipToBox(r),a,i.easing),e()}).animate(p,a,i.easing).animate(r,a,i.easing).queue(e),m.effects.unshift(t,h,4)})});