M
M
Messi2015-09-25 13:24:53
css
Messi, 2015-09-25 13:24:53

Script to add class on scroll?

What is the script for this task:
There are 4 blocks on the page, one under the other.
it is necessary if I am on block 1, then add the .active class.
When I scroll to another, it is removed there and added to the second.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2015-09-25
@ruozaki

jsfiddle.net/mekwall/up4nu

G
Gregory, 2015-09-25
@grigruss

https://jsfiddle.net/grigruss/byhst41L/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question