diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-06-06 19:03:10 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2012-06-06 19:03:10 -0400 |
commit | b9b87d53c681a8337cdbdbe81f8f4e577e5ec277 (patch) | |
tree | f0a0b04200353a199f326e272f9439b4606c6f54 /src/effects.js | |
parent | 5d25f78291c11ca26ce70281ee4ac81d1e3d8dd4 (diff) | |
download | jquery-b9b87d53c681a8337cdbdbe81f8f4e577e5ec277.tar.gz jquery-b9b87d53c681a8337cdbdbe81f8f4e577e5ec277.zip |
Less letterSpacing .animate() fail in IE. Fixes #8627
Diffstat (limited to 'src/effects.js')
-rw-r--r-- | src/effects.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/effects.js b/src/effects.js index bd2ac816d..9a3e64d41 100644 --- a/src/effects.js +++ b/src/effects.js @@ -365,19 +365,20 @@ Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { - var parsed, result; + var result; if ( tween.elem[ tween.prop ] != null && (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { return tween.elem[ tween.prop ]; } - result = jQuery.css( tween.elem, tween.prop ); - // Empty strings, null, undefined and "auto" are converted to 0, - // complex values such as "rotate(1rad)" are returned as is, - // simple values such as "10px" are parsed to Float. - return isNaN( parsed = parseFloat( result ) ) ? - !result || result === "auto" ? 0 : result : parsed; + // passing any value as a 4th paramter 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, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; }, set: function( tween ) { // use step hook for back compat - use cssHook if its there - use .style if its |