pulsate: correctly pulsates n-times now on show/hide

This commit is contained in:
Paul Bakaus 2008-06-08 15:07:25 +00:00
parent 658307ab8f
commit 85d3d34b56

View File

@ -25,12 +25,12 @@ $.effects.pulsate = function(o) {
var times = o.options.times || 5; // Default # of times var times = o.options.times || 5; // Default # of times
// Adjust // Adjust
if (mode != 'hide') times--; if (mode == 'hide') times--;
if (el.is(':hidden')) { // Show fadeIn if (el.is(':hidden')) { // Show fadeIn
el.css('opacity', 0); el.css('opacity', 0);
el.show(); // Show el.show(); // Show
el.animate({opacity: 1}, o.duration / 2, o.options.easing); el.animate({opacity: 1}, o.duration / 2, o.options.easing);
times--; times = times-2;
} }
// Animate // Animate