S
S
serik2018-03-19 17:21:22
JavaScript
serik, 2018-03-19 17:21:22

How to remove scrolling to a block without changing the url?

Implemented scrolling, when you click on one block, it will scroll to another.

var el = $(this).attr('href');
$('html, body').animate({
    scrollTop: $(el).offset().top - 50
}, 1500);
return false;

But when you click on the block, the url changes, how can I scroll without changing the url ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question