X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Feffects.js;h=fd832ce4a886c93a75856e78f722b1c912bf3536;hb=b9f5e2b97458f89cbcac3a333ba95b0eac568d49;hp=b0675395f45ac8d2ab5eb6d366da3b5d0bf42186;hpb=8e59a99e0ade75dec434f246f52e8b3f7393f359;p=jquery.git diff --git a/src/effects.js b/src/effects.js index b067539..fd832ce 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;