]> source.dussan.org Git - jquery-ui.git/commitdiff
effects.pulsate: tweaking 'times' - if showing / hiding the animation has an extra... 168/head
authorgnarf <gnarf@gnarf.net>
Tue, 3 May 2011 15:48:00 +0000 (10:48 -0500)
committergnarf <gnarf@gnarf.net>
Tue, 3 May 2011 15:48:00 +0000 (10:48 -0500)
ui/jquery.effects.pulsate.js

index bec33a4bb508c94a740744efbded5426d5f51eac..3325c251f28ba4b9c766fb5fe02cfef76913c945 100644 (file)
@@ -19,8 +19,8 @@ $.effects.effect.pulsate = function( o ) {
                        show = mode === "show" || elem.is( ":hidden" ),
                        showhide = ( show || mode === "hide" ),
 
-                       // showing or hiding leaves of the "last" animation
-                       anims = ( ( o.times || 5 ) * 2 ) - ( showhide ? 1 : 0 ),
+                       // showing or hiding adds an extra "half" animation
+                       anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
                        duration = o.duration / anims,
                        animateTo = 0,
                        queue = elem.queue(),