X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcss.js;h=0998657b047f94ed8075699c60bc9d00374bce48;hb=9d1bfeb7ffe63b5a7488929b7be847bc1a00f6a6;hp=30cecf39d42f54c3a18d9967600a7098b4e35cc9;hpb=e377621eaf85915b8459632cf2565e40e54d6c19;p=jquery.git diff --git a/src/css.js b/src/css.js index 30cecf3..0998657 100644 --- a/src/css.js +++ b/src/css.js @@ -173,12 +173,13 @@ jQuery.each(["height", "width"], function( i, name ) { 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"; @@ -247,7 +248,7 @@ if ( getComputedStyle ) { } } - return ret; + return ret === "" ? "auto" : ret; }; } else if ( document.documentElement.currentStyle ) { @@ -274,7 +275,7 @@ if ( getComputedStyle ) { elem.runtimeStyle.left = rsLeft; } - return ret; + return ret === "" ? "auto" : ret; }; }