I have looked up quite a few solutions on my problem but could not apply any solution to script below. I need to adjust the script so when the user scrolls based on a link it will scroll the the target plus 100 px so the top menu is not covering the section (my menu is 100 px height)
$(document).ready(function () {
$(document).on("scroll", onScroll);
$('a[href^="#"]').on('click', function (e) {
e.preventDefault();
$(document).off("scroll");
var target = this.hash;
$target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 500, 'swing', function () {
window.location.hash = target;
$(document).on("scroll", onScroll);
});
});
});