jQuery(document).ready(function() { jQuery('a[href*="#"]').on('click', (event) => { const hash = event.currentTarget.hash; if (hash) { event.preventDefault(); event.stopPropagation(); jQuery('html, body').animate({scrollTop: jQuery(hash).offset().top - jQuery(".elementor-location-header").height()}, 750); } }); });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter