I have the following jQuery-script to scroll the page down.
$(document).ready(function() {
$('a[href^=#]').on('click', function(e){
var href = $(this).attr('href');
$('html, body').animate({
scrollTop:$(href).offset().top
},1500);
e.preventDefault();
});
});
The page has a fixed header with a height of 100px. Obviously I need to scroll down 100px less, so the header doesn't overlay the heading. I googled and I need to put in "{offset: -100}" somewhere.. but where?