D
D
deespe12018-02-18 16:04:41
JavaScript
deespe1, 2018-02-18 16:04:41

How to make smooth scrolling on the button down to the next block?

There is a button that, when pressed, should make a smooth scroll down a block. How to do this with jQuery? The block sizes are different. Or at least how to scroll down a certain number of pixels?
5a89799ef0f38854575206.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2018-02-18
@chelovekmuravei

scroll down a certain number of pixels

$(".button").click(function(){
  document.documentElement.scrollTop = +20;
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question