diff options
Diffstat (limited to 'src/effects/Tween.js')
-rw-r--r-- | src/effects/Tween.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/effects/Tween.js b/src/effects/Tween.js index d7cd8e606..d26ddd918 100644 --- a/src/effects/Tween.js +++ b/src/effects/Tween.js @@ -1,4 +1,4 @@ -define([ +define( [ "../core", "../css" ], function( jQuery ) { @@ -71,10 +71,12 @@ Tween.propHooks = { // 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, "" ); + // 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 available and use plain properties where available. @@ -116,4 +118,4 @@ jQuery.fx = Tween.prototype.init; // Back Compat <1.8 extension point jQuery.fx.step = {}; -}); +} ); |