I’ve got a one-page nav set up which is working perfectly.
The issue I’m having is that the scroll is stopping before the section leaving the exact header width as a gap.
I’ve got a transparent header so I don’t want to have the gap. I want it to scroll all the way so the section fills the screen.
I’ve tried this JS code from another post I saw but it’s not working:
jQuery(function($){
$('a[href*="#"]').off('touchend click');
$('a[href*="#"]').on('touchend click', function(e) {
e.preventDefault();
var id = $(this).attr('href');
var $id = $(id);
if ($id.length === 0) {
return;
}
var pos = $id.offset().top - 70;
$('body, html').animate({scrollTop: pos}, 1000, 'easeInOutQuart');
return false;
});
});
Here is a link to the website: gg.archerthefox.com/splash