aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects.js
diff options
context:
space:
mode:
authortimmywil <tim.willison@thisismedium.com>2011-05-07 21:26:02 -0400
committertimmywil <tim.willison@thisismedium.com>2011-05-07 21:26:02 -0400
commit90f37aaf7aa7c6da96ab15488b63b2eb45a2e799 (patch)
tree657f42b264775c2919f0bce18903bc8c1da0e689 /src/effects.js
parent8bb6e95b66413c484006288691a82c44ba50554e (diff)
downloadjquery-90f37aaf7aa7c6da96ab15488b63b2eb45a2e799.tar.gz
jquery-90f37aaf7aa7c6da96ab15488b63b2eb45a2e799.zip
Call extend on prop to avoid changing original properties so that per-property easing is not lost in multiple animations with the same props
Diffstat (limited to 'src/effects.js')
-rw-r--r--src/effects.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/effects.js b/src/effects.js
index 801f3f101..88661e0e9 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -126,6 +126,9 @@ jQuery.fn.extend({
return this.each( optall.complete, [ false ] );
}
+ // Do not change referenced properties as per-property easing will be lost
+ prop = jQuery.extend( {}, prop );
+
return this[ optall.queue === false ? "each" : "queue" ](function() {
// XXX 'this' does not always have a nodeName when running the
// test suite
@@ -158,7 +161,7 @@ jQuery.fn.extend({
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
if ( jQuery.isArray( val ) ) {
opt.animatedProperties[ name ] = val[ 1 ];
- val = val[ 0 ];
+ val = prop[ name ] = val[ 0 ];
} else {
opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
}