Answer the question
In order to leave comments, you need to log in
Why do anchors not work properly in a vertical menu using js scrolling?
I use a script for smooth scrolling from anchors with an indent from above
$(document).ready(function() {
$(".Anchor").on("click", "a", function(event) {
event.preventDefault();
var id = $(this).attr('href'),
top = $(id).offset().top;
$('div').animate({
scrollTop: top - 200
}, 500);
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question