aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.pulsate.js
diff options
context:
space:
mode:
authorgnarf <gnarf@gnarf.net>2011-05-10 16:16:34 -0500
committergnarf <gnarf@gnarf.net>2011-05-10 16:16:34 -0500
commit27a7deebf299e1673e8b452476be02e486bba2c6 (patch)
tree79521a78ab770ebd7ee167575b680f14d3ed4089 /ui/jquery.effects.pulsate.js
parent4dcfeee8d54d81db4d5af8b2fd189b799cd9561e (diff)
parent85ac420a1e4281ee7f361e847d3cad72fa58525e (diff)
downloadjquery-ui-27a7deebf299e1673e8b452476be02e486bba2c6.tar.gz
jquery-ui-27a7deebf299e1673e8b452476be02e486bba2c6.zip
Merge branch 'master' into effects-unit
Conflicts: ui/jquery.effects.pulsate.js
Diffstat (limited to 'ui/jquery.effects.pulsate.js')
-rw-r--r--ui/jquery.effects.pulsate.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js
index 30c346abd..54c5c10af 100644
--- a/ui/jquery.effects.pulsate.js
+++ b/ui/jquery.effects.pulsate.js
@@ -18,9 +18,10 @@ $.effects.effect.pulsate = function( o ) {
mode = $.effects.setMode( elem, o.mode || "show" ),
show = mode === "show",
hide = mode === "hide",
+ showhide = ( show || mode === "hide" ),
// showing or hiding leaves of the "last" animation
- anims = ( ( o.times || 5 ) * 2 ) - ( show || hide ? 1 : 0 ),
+ anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
duration = o.duration / anims,
animateTo = 0,
queue = elem.queue(),
@@ -32,7 +33,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 );