Make sure that .width()/.height() don't return NaN also standardize on returning instead of auto for default values (which is what we do elsewhere in .css() as well). Fixes #7225.
This commit is contained in:
parent
7e02cee5ff
commit
53396b879b
3 changed files with 23 additions and 25 deletions
|
@ -169,15 +169,11 @@ jQuery.each(["height", "width"], function( i, name ) {
|
|||
});
|
||||
}
|
||||
|
||||
if ( val < 0 ) {
|
||||
return elem.style[ name ] || "0px";
|
||||
}
|
||||
|
||||
if ( val === 0 ) {
|
||||
if ( val <= 0 ) {
|
||||
val = curCSS( elem, name, name );
|
||||
|
||||
if ( val != null ) {
|
||||
return val;
|
||||
return val === "auto" ? "" : val;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue