Created
January 16, 2012 19:11
-
-
Save psiborg/1622431 to your computer and use it in GitHub Desktop.
JS 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 getDocHeight() { | |
| var D = document; | |
| return Math.max( | |
| Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), | |
| Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), | |
| Math.max(D.body.clientHeight, D.documentElement.clientHeight) | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment