I cannot get a div's pageYOffset
.
I'm trying to get rid of the html scrollbar so that it only appears between toolbar and footer components instead of getting displayed over them.
Here's an example:
https://codepen.io/anon/pen/xYppdQ
I made html overflow hidden and allowed only a content tag to be scrollable.
Most likely I'm doing something wrong there but OffsetTop
stays at 0 when I'm trying to get the value using this method:
onScroll (e) {
this.offsetTop = window.getElementsByClassName("scroll-container").pageYOffset
}