Skip to content
Permalink
Browse files

Switching to use a better check for if the node is a document.

  • Loading branch information
jeresig committed Jul 18, 2009
1 parent d828ff7 commit 9d46c0ebb46037cfcc026e874d459d2cd412294e
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/dimensions.js
@@ -27,7 +27,7 @@ jQuery.each([ "Height", "Width" ], function(i, name){
elem.document.body[ "client" + name ] :

// Get document width or height
(elem.nodeName === "#document") ? // is it a document
(elem.nodeType === 9) ? // is it a document
// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
Math.max(
elem.documentElement["client" + name],

0 comments on commit 9d46c0e

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