-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.js
34 lines (32 loc) · 990 Bytes
/
scripts.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
33
34
document.addEventListener('DOMContentLoaded', function () {
const viewDetailsButtons = document.querySelectorAll('.view-details-button');
const projectModal = new bootstrap.Modal(document.getElementById('projectModal'));
const modalImage = document.getElementById('projectModalImage');
const modalDescription = document.getElementById('projectModalDescription');
// Sample project details
const projects = [
{
title: 'Garf',
image: 'project1.jpg',
description: 'Garf',
},
{
title: 'Garf',
image: 'project2.jpg',
description: 'Garf',
},
{
title: 'Garf',
image: 'project3.jpg',
description: 'Garf',
},
// Add more projects as needed
];
viewDetailsButtons.forEach((button, index) => {
button.addEventListener('click', function () {
modalImage.src = projects[index].image;
modalDescription.textContent = projects[index].description;
projectModal.show();
});
});
});