]> source.dussan.org Git - jquery-ui.git/commitdiff
pulsate: correctly pulsates n-times now on show/hide
authorPaul Bakaus <paul.bakaus@googlemail.com>
Sun, 8 Jun 2008 15:07:25 +0000 (15:07 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Sun, 8 Jun 2008 15:07:25 +0000 (15:07 +0000)
ui/effects.pulsate.js

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