A
A
Andrey Vasilev2020-07-24 16:00:29
Vue.js
Andrey Vasilev, 2020-07-24 16:00:29

How can I get top offset in vue.js?

How can I get the actual top offset in vue.js?

window.addEventListener("scroll", this.handleScroll)
I listen, but I don’t understand where to get the offset from.
method:
handleScroll(event) {
 console.log(event.target.offsetTop)
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2020-07-24
@Fragster

this.$el.addEventListener

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question