Inital Commit
This commit is contained in:
19
html/drone/js/main.js
Normal file
19
html/drone/js/main.js
Normal file
@@ -0,0 +1,19 @@
|
||||
// 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
|
||||
});
|
||||
Reference in New Issue
Block a user