aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects.js
diff options
context:
space:
mode:
authorAnton M <obhvsbypqghgc@gmail.com>2011-02-13 23:03:46 +0100
committerAnton M <obhvsbypqghgc@gmail.com>2011-02-13 23:17:58 +0100
commitc5edf982d59977c506fececd504a3dbfd1a398dc (patch)
tree19338a5acb5b3f2be3d9f3af2a0d33e83836e36c /src/effects.js
parentdba8c20b4bfdeb95b6fb8c9555355babf1daa539 (diff)
downloadjquery-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.js4
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;