Hello Alex Barendregt,
Sorry for the inconvenience you're experiencing.
Please add the following code snippet to your Template Options under Custom Code, in the Custom Javascript section:
jQuery(function ($) {
'use strict';
$(document).on('click', '.offcanvas-init a[href^="#"]:not([href="#"])', function(e) {
e.preventDefault();
var target = $(this).attr('href');
if ($(target).length > 0) {
var headerHeight = $('#sp-header').outerHeight() || 80;
var targetOffset = $(target).offset().top - headerHeight;
$('.offcanvas-init').removeClass('offcanvas-active full-offcanvas');
$('html, body').animate({
scrollTop: targetOffset
}, 400);
}
});
$(document).on('click', '#modal-menu a[href^="#"]:not([href="#"])', function(e) {
e.preventDefault();
var target = $(this).attr('href');
if ($(target).length > 0) {
var $modalMenu = $('#modal-menu');
var $modalToggler = $('#modal-menu-toggler');
var $body = $('body');
var headerHeight = $('#sp-header').outerHeight() || 80;
var targetOffset = $(target).offset().top - headerHeight;
$modalMenu.removeClass('active');
$modalToggler.removeClass('active');
$body.removeClass('modal-menu-active');
$('html, body').animate({
scrollTop: targetOffset
}, 400);
}
});
});
Hope this helps! If the issue still persists, please let me know and I will investigate further.
Best regards