19 lines
777 B
JavaScript
19 lines
777 B
JavaScript
// This file contains the main JavaScript code for the website, handling general interactivity and functionality.
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
// Initialize any necessary components or features
|
|
console.log('Roof Drone Cleaning Website Loaded');
|
|
|
|
// Example: Smooth scroll for anchor links
|
|
const scrollLinks = document.querySelectorAll('a[href^="#"]');
|
|
scrollLinks.forEach(link => {
|
|
link.addEventListener('click', function(e) {
|
|
e.preventDefault();
|
|
const targetId = this.getAttribute('href');
|
|
const targetElement = document.querySelector(targetId);
|
|
targetElement.scrollIntoView({ behavior: 'smooth' });
|
|
});
|
|
});
|
|
|
|
// Additional functionality can be added here
|
|
}); |