X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Feffects.js;h=09aba14c7d1d920900bb4fb407ed8387975730a2;hb=bb9408516aa0fc8892f4e07a99b1a47bce06081b;hp=2dd701117a6d557c4eab57964b606fbae74aa710;hpb=c67867ad0cd546ab461f13336f74b3f762d8fe7d;p=jquery.git diff --git a/src/effects.js b/src/effects.js index 2dd7011..09aba14c 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;