Skip to content

Commit

Permalink
Update week7.html
Browse files Browse the repository at this point in the history
  • Loading branch information
user0disconnect authored Nov 20, 2023
1 parent 4b5fc2a commit 584d408
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Labs/week7/week7.html
Original file line number Diff line number Diff line change
Expand Up @@ -349,16 +349,17 @@ <h3>Drei Hirtenkinder aus Fátima by Johannes Stecher</h3>
modalImg.src = this.src;
captionText.innerHTML = this.alt;
}
for (var i = 0; i < img.length; i++) {
img[i].addEventListener('click', showModal);
}

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
</script>


</body>
</html>

0 comments on commit 584d408

Please sign in to comment.