Last active
August 29, 2015 14:12
-
-
Save jayjayswal/717e81d6f6626bd62b2d to your computer and use it in GitHub Desktop.
Get Height of document in any browser
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( | |
D.body.scrollHeight, D.documentElement.scrollHeight, | |
D.body.offsetHeight, D.documentElement.offsetHeight, | |
D.body.clientHeight, D.documentElement.clientHeight | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment