Skip to content

Instantly share code, notes, and snippets.

@berkin
Created December 6, 2016 07:21
Show Gist options
  • Save berkin/f5a17d81017afd44d3d8d6cd9c9cd4bc to your computer and use it in GitHub Desktop.
Save berkin/f5a17d81017afd44d3d8d6cd9c9cd4bc to your computer and use it in GitHub Desktop.
Scroll height of content
function scrollHeight() {
const body = document.body;
const html = document.documentElement;
return Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment