18 lines
557 B
JavaScript
18 lines
557 B
JavaScript
document.addEventListener('DOMContentLoaded', function() {
|
|
console.log('main.js loaded successfully.');
|
|
|
|
// Future JavaScript for animations, dynamic content, and game logic will go here.
|
|
|
|
// Example: Smooth scrolling for anchor links
|
|
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
|
anchor.addEventListener('click', function (e) {
|
|
e.preventDefault();
|
|
|
|
document.querySelector(this.getAttribute('href')).scrollIntoView({
|
|
behavior: 'smooth'
|
|
});
|
|
});
|
|
});
|
|
|
|
});
|