aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.pulsate.js
diff options
context:
space:
mode:
authorgnarf <gnarf@gnarf.net>2011-05-01 06:24:22 -0500
committergnarf <gnarf@gnarf.net>2011-05-01 06:24:22 -0500
commit1eada2154910102e4c39d131a23af24ad0d92815 (patch)
tree29a8318e17911718140698d5cf55ab98b686d136 /ui/jquery.effects.pulsate.js
parentec5aeb1b154a023e2630d21aa7982ca13a00f03e (diff)
downloadjquery-ui-1eada2154910102e4c39d131a23af24ad0d92815.tar.gz
jquery-ui-1eada2154910102e4c39d131a23af24ad0d92815.zip
effects.*: Updating fade, pulsate, scale, shake to pass units
Diffstat (limited to 'ui/jquery.effects.pulsate.js')
-rw-r--r--ui/jquery.effects.pulsate.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js
index bcba48797..30c346abd 100644
--- a/ui/jquery.effects.pulsate.js
+++ b/ui/jquery.effects.pulsate.js
@@ -16,18 +16,18 @@ $.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" ),
- showhide = ( show || mode === "hide" ),
+ show = mode === "show",
+ hide = mode === "hide",
// showing or hiding leaves of the "last" animation
- anims = ( ( o.times || 5 ) * 2 ) - ( showhide ? 1 : 0 ),
+ anims = ( ( o.times || 5 ) * 2 ) - ( show || hide ? 1 : 0 ),
duration = o.duration / anims,
animateTo = 0,
queue = elem.queue(),
queuelen = queue.length,
i;
- if ( show ) {
+ if ( show || !elem.is(':visible')) {
elem.css( "opacity", 0 ).show();
animateTo = 1;
}
@@ -42,7 +42,7 @@ $.effects.effect.pulsate = function( o ) {
elem.animate({
opacity: animateTo
}, duration, o.easing, function() {
- if ( animateTo === 0 ) {
+ if ( hide ) {
elem.hide();
}
if ( o.complete ) {