Created
June 11, 2012 08:29
-
-
Save Stanton/2909088 to your computer and use it in GitHub Desktop.
Get document height
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getDocumentHeight() { | |
return Math.max( | |
Math.max(document.body.scrollHeight, document.documentElement.scrollHeight), | |
Math.max(document.body.offsetHeight, document.documentElement.offsetHeight), | |
Math.max(document.body.clientHeight, document.documentElement.clientHeight) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment