0
I have this jquery that animates the scroll when you click on a link.
How do I so that when I click on the link the scroll goes a little lower, like a 10% down, would have like?
// Smooth scroll Function
$(document).on('click', '.menu-item a , #menu-one-page-menu a ', function (e) {
if ($(e.target).is('a[href*="#"]:not([href="#"]')) {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
|| location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
}
});