9 lines
987 B
JavaScript
9 lines
987 B
JavaScript
/*!
|
|
* 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
|
|
*/
|
|
(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,s=/([0-9]+)%/.exec(f),o=!!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[o[0]],u[o[1]]],h=t.queue().length;s&&(f=parseInt(s[1],10)/100*d[n?0:1]),p.clip[o[0]]=f,r.clip[o[0]]=f,r.clip[o[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)})}); |