S
S
Smeecy Smeecy2017-07-23 15:54:05
Vue.js
Smeecy Smeecy, 2017-07-23 15:54:05

How to add a class on scroll using VueJs?

It is necessary to add a class to the element when scrolling. How to implement this with VueJs?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
RaulDuke, 2017-07-23
@Wekeed

Good afternoon.
https://jsfiddle.net/olegcvetkov76/hjvh2n76/

W
WebDev, 2017-07-23
@kirill-93

In the created method, add an eventListener to the scroll, in which to add a class, VueJS, what does it have to do with it?

E
Evgeny Kulakov, 2017-07-23
@kulakoff Vue.js

I’ll also add: if you need to catch scrolling on some internal vue element, then there are @scroll and wheel events (for the mouse wheel).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question