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" ) {
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;
// create a temp element and check it's default display, this
// will ensure that the value returned is not a user-tampered
// value.
- elem = jQuery("<" + nodeName + ">").appendTo("body"),
+ elem = jQuery("<" + nodeName + ">").appendTo("body");
display = elem.css("display");
// Remove temp element