Answer the question
In order to leave comments, you need to log in
How to make a link that doesn't reload the page?
I have a regular link. <a href="#"> </a>
When you click on it, the page does not reload, but the page takes you up. Is there something like that? so that clicking on the link is not noticeable.
Answer the question
In order to leave comments, you need to log in
Hang the handler and cancel the browser action.
$('a').on('click', function (e) { e.preventDefault() })
<a href="#nameOfId"> </a>
it should refer to the id in the page code and will shift the screen to its place in the block with the given id, for example<a href="#header"> </a>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question