val = curCSS( elem, name, name );
if ( val != null ) {
- return val === "auto" ? "" : val;
+ return val;
}
}
if ( val < 0 || val == null ) {
- return elem.style[ name ];
+ val = elem.style[ name ];
+ return val === "" ? "auto" : val;
}
return typeof val === "string" ? val : val + "px";
}
}
- return ret;
+ return ret === "" ? "auto" : ret;
};
} else if ( document.documentElement.currentStyle ) {
elem.runtimeStyle.left = rsLeft;
}
- return ret;
+ return ret === "" ? "auto" : ret;
};
}
var div = jQuery( "<div>" );
- equals( div.css("width"), "", "Width on disconnected node." );
- equals( div.css("height"), "", "Height on disconnected node." );
+ equals( div.css("width"), "auto", "Width on disconnected node." );
+ equals( div.css("height"), "auto", "Height on disconnected node." );
div.css({ width: 4, height: 4 });