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

21 lines
1.0 KiB
JavaScript
Raw Normal View History

/*!
* jQuery UI Effects Pulsate 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/pulsate-effect/
*/
!function(a){"function"==typeof define&&define.amd?
// AMD. Register as an anonymous module.
define(["jquery","./effect"],a):
// Browser globals
a(jQuery)}(function(a){return a.effects.effect.pulsate=function(b,c){var d,e=a(this),f=a.effects.setMode(e,b.mode||"show"),g="show"===f,h="hide"===f,i=g||"hide"===f,
// showing or hiding leaves of the "last" animation
j=2*(b.times||5)+(i?1:0),k=b.duration/j,l=0,m=e.queue(),n=m.length;
// anims - 1 opacity "toggles"
for((g||!e.is(":visible"))&&(e.css("opacity",0).show(),l=1),d=1;j>d;d++)e.animate({opacity:l},k,b.easing),l=1-l;e.animate({opacity:l},k,b.easing),e.queue(function(){h&&e.hide(),c()}),
// We just queued up "anims" animations, we need to put them next in the queue
n>1&&m.splice.apply(m,[1,0].concat(m.splice(n,j+1))),e.dequeue()}});