Created
March 14, 2017 06:03
-
-
Save hiyangguo/4795bef9dc71e81b5b31acba60af278d to your computer and use it in GitHub Desktop.
getDocumentHeight
This file contains 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 documentHeight() { | |
return Math.max( | |
document.documentElement.clientHeight, | |
document.body.scrollHeight, | |
document.documentElement.scrollHeight, | |
document.body.offsetHeight, | |
document.documentElement.offsetHeight | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment