memory-lift / script.js
avgads's picture
Memory Lift
18c19b5 verified
Raw History Blame Contribute Delete
438 Bytes
// Initialize any global functionality
document.addEventListener('DOMContentLoaded', () => {
// Smooth scroll for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
});