Skip to content

Instantly share code, notes, and snippets.

@taimursaeed
Last active March 5, 2019 09:56
Show Gist options
  • Save taimursaeed/17265a36b77f96d0583371e0e800572e to your computer and use it in GitHub Desktop.
Save taimursaeed/17265a36b77f96d0583371e0e800572e to your computer and use it in GitHub Desktop.
document.documentElement //<HTML> tag
document.body //<Body> tag
document.documentElement.scrollHeight //Total page height
document.documentElement.clientHeight || window.innerHeight //Viewport height
window.scrollY || document.documentElement.scrollTop //How much the document is scrolled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment