aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.pulsate.js
blob: a0ddf51fd93a57139760c8d6f4da09c26b573631 (generated by cgit v1.2.3 (git 2.39.1) at 2025-08-15 22:19:47 +0000
an class="w"> mode === "hide", showhide = ( show || mode === "hide" ), // showing or hiding leaves of the "last" animation anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), duration = o.duration / anims, animateTo = 0, queue = elem.queue(), queuelen = queue.length, i; if ( show || !elem.is(':visible')) { elem.css( "opacity", 0 ).show(); animateTo = 1; } // anims - 1 opacity "toggles" for ( i = 1; i < anims; i++ ) { elem.animate({ opacity: animateTo }, duration, o.easing ); animateTo = 1 - animateTo; } elem.animate({ opacity: animateTo }, duration, o.easing); elem.queue( function( next ) { if ( hide ) { elem.hide(); } if ( o.complete ) { o.complete.apply( this ); } next(); }); // We just queued up "anims" animations, we need to put them next in the queue if ( queuelen > 1) { queue.splice.apply( queue, [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); } next(); }); }; })(jQuery);