]> source.dussan.org Git - jquery-ui.git/commitdiff
effects.pulsate: set default mode to 'effect'
authorgnarf <gnarf@gnarf.net>
Tue, 3 May 2011 12:22:34 +0000 (07:22 -0500)
committergnarf <gnarf@gnarf.net>
Tue, 3 May 2011 12:22:34 +0000 (07:22 -0500)
ui/jquery.effects.pulsate.js

index bcba487971b17b64a63b4996ddd81baeffa27ae4..bec33a4bb508c94a740744efbded5426d5f51eac 100644 (file)
@@ -15,8 +15,8 @@
 $.effects.effect.pulsate = function( o ) {
        return this.queue( function( next ) {
                var elem = $( this ),
-                       mode = $.effects.setMode( elem, o.mode || "show" ),
-                       show = mode === "show" || !elem.is( ":visible" ),
+                       mode = $.effects.setMode( elem, o.mode || "effect" ),
+                       show = mode === "show" || elem.is( ":hidden" ),
                        showhide = ( show || mode === "hide" ),
 
                        // showing or hiding leaves of the "last" animation
@@ -32,7 +32,8 @@ $.effects.effect.pulsate = function( o ) {
                        animateTo = 1;
                }
 
-               for ( i = 0; i < anims - 1; i++ ) {
+               // anims - 1 opacity "toggles"
+               for ( i = 1; i < anims; i++ ) {
                        elem.animate({
                                opacity: animateTo
                        }, duration, o.easing );