-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
19 lines (18 loc) · 730 Bytes
/
Copy pathscript.js
File metadata and controls
19 lines (18 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
document.addEventListener("DOMContentLoaded", function() {
function loadSection(id, file) {
fetch(file)
.then(response => response.text())
.then(data => {
document.getElementById(id).innerHTML = data;
})
.catch(error => console.error('Error loading section:', error));
}
loadSection('header', 'header.html');
loadSection('hero', 'hero.html');
loadSection('categories', 'categories.html');
loadSection('destinations', 'destinations.html');
loadSection('testimonials', 'testimonials.html');
loadSection('partners', 'partners.html');
loadSection('subscribe', 'subscribe.html');
loadSection('footer', 'footer.html');
});