In Javascript window.pageYOffset
and document.documentElement.scrollTop
both measures the distance of an window top to its topmost visible content in pixel. Are they both same or am I missing something?
Trust window.pageYOffset
is not supported for IE < 9 but if assuming IE >8 then
- When to use each of them
- difference between them