X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=53d5f4a4b1601bd0c4e83a00051d659beb0aaf05;hb=3e3b86c7a7437c7b0416a2ac8385cf9403fc9e28;hp=a37ae783f80d76e6293230a0a1ba7918c003af41;hpb=279f77e9609fba62c11a06f8c65221b16f7bc7d4;p=jquery.git diff --git a/src/core.js b/src/core.js index a37ae78..53d5f4a 100644 --- a/src/core.js +++ b/src/core.js @@ -1311,8 +1311,11 @@ jQuery.each([ "Height", "Width" ], function(i, name){ // Get document width or height this[0] == document ? - // Either scroll[Width/Height] or offset[Width/Height], whichever is greater (Mozilla reports scrollWidth the same as offsetWidth) - Math.max( document.body[ "scroll" + name ], document.body[ "offset" + name ] ) : + // Either scroll[Width/Height] or offset[Width/Height], whichever is greater + Math.max( + Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]), + Math.max(document.body["offset" + name], document.documentElement["offset" + name]) + ) : // Get or set width or height on the element size == undefined ?