Skip to content
Permalink
Browse files

Merge branch 'master' of https://github.com/scottjehl/jquery into sco…

…ttjehl-master
  • Loading branch information
jeresig committed Jan 20, 2011
2 parents 35875ac + 2b64b1d commit c97b6ee36a1402b6f4bb3f6893b687eb294c41df
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/dimensions.js
@@ -35,8 +35,10 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {

if ( jQuery.isWindow( elem ) ) {
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
return elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
elem.document.body[ "client" + name ];
// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
var docElemProp = elem.document.documentElement[ "client" + name ];
return elem.document.compatMode === "CSS1Compat" && docElemProp ||
elem.document.body[ "client" + name ] || docElemProp;

// Get document width or height
} else if ( elem.nodeType === 9 ) {

0 comments on commit c97b6ee

Please sign in to comment.
You can’t perform that action at this time.