aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/css.js b/src/css.js
index 933d2b45e..f2165f904 100644
--- a/src/css.js
+++ b/src/css.js
@@ -169,6 +169,10 @@ jQuery.each(["height", "width"], function( i, name ) {
});
}
+ if ( val < 0 || val === 0 && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+ return elem.style[ name ] || "0px";
+ }
+
return val + "px";
}
},