aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2013-01-15 23:09:35 -0500
committerDave Methvin <dave.methvin@gmail.com>2013-01-15 23:28:56 -0500
commit65df32dc21dc315fe0dcccdcf7d07884f4794ccd (patch)
tree3fe68918477ca59a8c762595d7825b4fafd5aad8 /src
parent79feac9584396f3628c07d0eed7557d5f70043ec (diff)
downloadjquery-65df32dc21dc315fe0dcccdcf7d07884f4794ccd.tar.gz
jquery-65df32dc21dc315fe0dcccdcf7d07884f4794ccd.zip
Fix #13183: Wrong animation initial value calc. Close gh-1136.
Diffstat (limited to 'src')
-rw-r--r--src/css.js2
-rw-r--r--src/effects.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/css.js b/src/css.js
index 7ddce0a04..03437c2a7 100644
--- a/src/css.js
+++ b/src/css.js
@@ -265,7 +265,7 @@ jQuery.extend({
}
// Return, converting to number if forced or a qualifier was provided and val looks numeric
- if ( extra ) {
+ if ( extra === "" || extra ) {
num = parseFloat( val );
return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
}
diff --git a/src/effects.js b/src/effects.js
index f72521024..189f65ce5 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -427,11 +427,11 @@ Tween.propHooks = {
return tween.elem[ tween.prop ];
}
- // passing a non empty string as a 3rd parameter to .css will automatically
+ // passing an empty string as a 3rd parameter to .css will automatically
// attempt a parseFloat and fallback to a string if the parse fails
// so, simple values such as "10px" are parsed to Float.
// complex values such as "rotate(1rad)" are returned as is.
- result = jQuery.css( tween.elem, tween.prop, "auto" );
+ result = jQuery.css( tween.elem, tween.prop, "" );
// Empty strings, null, undefined and "auto" are converted to 0.
return !result || result === "auto" ? 0 : result;
},