From a918dc8aacb8461321c332f6f3b5756bdda5e8b2 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Mon, 10 Dec 2012 18:25:23 -0500 Subject: Pass style declarations around for performance improvements and paving the way for the css array signature Also, simplify the jQuery.css numeric coercion signature --- src/effects.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/effects.js') diff --git a/src/effects.js b/src/effects.js index da680f0b6..3d9ae7f4b 100644 --- a/src/effects.js +++ b/src/effects.js @@ -420,11 +420,11 @@ Tween.propHooks = { return tween.elem[ tween.prop ]; } - // passing any value as a 4th parameter to .css will automatically + // passing a non 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, false, "" ); + result = jQuery.css( tween.elem, tween.prop, "auto" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, -- cgit v1.2.3