jQuery(document).ready( function(){
// Check if there's a hash in the URL
const hash = window.location.hash;
if (hash) {
// Get the target element based on the hash
const target = jQuery(hash);
if (target.length) {
// Calculate the offset based on the sticky menu height
const offset = jQuery('.fusion-header').outerHeight(); // Adjust based on your menu's class
console.log('offset ' + offset);
// Smooth scroll to the target section
jQuery('html, body').animate({
scrollTop: target.offset().top - offset
}, 800); // Adjust the duration if needed
}
}
});
Skip to content