M
M
Mark2019-02-25 00:28:26
JavaScript
Mark, 2019-02-25 00:28:26

How to remove stops in js code when scrolling?

I have a button that moves down when clicked,
but when adapting, I noticed that if I change the distance by which
the button will move when clicked, stops appear. How to fix it?
Here is the link to Codepen: https://codepen.io/anon/pen/gEYwaK

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-02-25
@Casufi

the first cycle runs in any case - 100 pixels per second, the second - if the width is less than 2500 - 1000 pixels per second.
Didn't have any ideas?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question