From 584d408fe00ab2b61b5dbe24f74a08cac15a7622 Mon Sep 17 00:00:00 2001 From: anastasia <109434678+user0disconnect@users.noreply.github.com> Date: Tue, 21 Nov 2023 00:44:35 +0200 Subject: [PATCH] Update week7.html --- Labs/week7/week7.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Labs/week7/week7.html b/Labs/week7/week7.html index c32d022c..449bb958 100644 --- a/Labs/week7/week7.html +++ b/Labs/week7/week7.html @@ -349,9 +349,9 @@

Drei Hirtenkinder aus Fátima by Johannes Stecher

modalImg.src = this.src; captionText.innerHTML = this.alt; } - for (var i = 0; i < img.length; i++) { - img[i].addEventListener('click', showModal); -} + +// Get the element that closes the modal +var span = document.getElementsByClassName("close")[0]; // When the user clicks on (x), close the modal span.onclick = function() { @@ -359,6 +359,7 @@

Drei Hirtenkinder aus Fátima by Johannes Stecher

} +