-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
32 lines (25 loc) · 810 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
// Get all room images
let roomImages = document.querySelectorAll('.room-image');
// Add click event listener to each image
roomImages.forEach(image => {
image.addEventListener('click', function() {
// Get the modal corresponding to the clicked image
let modalId = this.getAttribute('data-modal');
let modal = document.getElementById(modalId);
// Show the modal
modal.style.display = 'block';
});
});
// Get all modal close buttons
let closeButtons = document.querySelectorAll('.modal-close');
// Add click event listener to each close button
closeButtons.forEach(button => {
button.addEventListener('click', function() {
// Get the parent modal of the close button
let modal = this.parentElement;
// Hide the modal
modal.style.display = 'none';
});
});
*/