I have the following li
<li class="madmaxmenu">
<a href="#mad-max">Mad Max</a>
</li>
and the following Jquery
$("li.madmaxmenu").click(function() {
$('html,body').animate({
scrollTop: $("#madmax").offset().top - 120},
'slow');
});
That is, when I click on li it goes straight to the section I reported and already informs the href in the address bar.
For example: link
And if I want the user to type link in the address bar, it will go directly to that address section, without having to click on the menu, how? Do the same process as if he had clicked on the li in question. Site link