H
H
HennesyGregson2020-06-19 10:30:21
css
HennesyGregson, 2020-06-19 10:30:21

How to make a scrollbar based on anchors?

I want to make these anchors. At the top, on the main page, it should look like this:
5eec69e467eca017851010.png
But when the user scrolls through it in sections, the scrollbar should turn into clickable dots. Like this:
5eec69f9e3e8b959465184.png
The question is stupid, but is there any script or library with which this can be done? Points, in principle, can be made with pagination Scrollify or fullpage, but how to animate it? Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima, 2020-06-19
@HennesyGregson

listen to the scroll event and do actions
1) if you give the dots a class that stretches them wide, if not, then remove the class and they are dots again 2) for smooth animation, here it is written gnatkovsky.com.ua/yakorya-i-plavnyj-perexod-po -yak... 3) the points themselves , that's all it seems) scrollTop == 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question