diff options
author | Anton M <obhvsbypqghgc@gmail.com> | 2011-02-13 23:03:46 +0100 |
---|---|---|
committer | Anton M <obhvsbypqghgc@gmail.com> | 2011-02-13 23:17:58 +0100 |
commit | c5edf982d59977c506fececd504a3dbfd1a398dc (patch) | |
tree | 19338a5acb5b3f2be3d9f3af2a0d33e83836e36c /src/effects.js | |
parent | dba8c20b4bfdeb95b6fb8c9555355babf1daa539 (diff) | |
download | jquery-c5edf982d59977c506fececd504a3dbfd1a398dc.tar.gz jquery-c5edf982d59977c506fececd504a3dbfd1a398dc.zip |
Don't add "px" to unit-less properties when animating them. Fixes #4966.
Diffstat (limited to 'src/effects.js')
-rw-r--r-- | src/effects.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/effects.js b/src/effects.js index b0675395f..0b08bc2da 100644 --- a/src/effects.js +++ b/src/effects.js @@ -189,7 +189,7 @@ jQuery.fn.extend({ if ( parts ) { var end = parseFloat( parts[2] ), - unit = parts[3] || "px"; + unit = parts[3] || jQuery.cssNumber[ name ] ? "" : "px"; // We need to compute starting value if ( unit !== "px" ) { @@ -348,7 +348,7 @@ jQuery.fx.prototype = { this.startTime = jQuery.now(); this.start = from; this.end = to; - this.unit = unit || this.unit || "px"; + this.unit = unit || this.unit || jQuery.cssNumber[ this.prop ] ? "" : "px"; this.now = this.start; this.pos = this.state = 0; |