Smooth Scrolling for Anchor Links

document.addEventListener(‘click’, function(e) { // Check if the clicked element is an anchor with href starting with ‘#’ if (e.target.tagName === ‘A’ && e.target.getAttribute(‘href’) && e.target.getAttribute(‘href’).startsWith(‘#’)) { e.preventDefault(); const targetId = e.target.getAttribute(‘href’).slice(1); // Remove the ‘#’ from the href const targetElement…Continue reading

Scroll Progress Bar

add_action(‘wp_body_open’, function() { echo ‘ ‘; }); add_action(‘wp_head’, function() { echo ‘ ‘; }); add_action(‘wp_footer’, function() { echo ‘‘; });Continue reading