aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects.js
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-06-06 19:03:10 -0400
committerRick Waldron <waldron.rick@gmail.com>2012-06-06 19:03:10 -0400
commitb9b87d53c681a8337cdbdbe81f8f4e577e5ec277 (patch)
treef0a0b04200353a199f326e272f9439b4606c6f54 /src/effects.js
parent5d25f78291c11ca26ce70281ee4ac81d1e3d8dd4 (diff)
downloadjquery-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.js15
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