-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
55 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +0,0 @@ | ||
|
||
|
||
// Function to show image in overlay | ||
function showImageInOverlay(url) { | ||
const overlay = document.getElementById('imageOverlay'); | ||
const overlayImage = document.getElementById('overlayImage'); | ||
overlayImage.src = url; // Set the clicked image in the overlay | ||
overlay.style.display = 'flex'; // Show the overlay | ||
} | ||
|
||
// Close the overlay when 'x' button is clicked | ||
const closeOverlay = document.getElementById("closeOverlay"); | ||
closeOverlay.addEventListener("click", function() { | ||
document.getElementById("imageOverlay").style.display = "none"; | ||
}); | ||
|
||
// Optionally, close the overlay if the user clicks outside the image | ||
const overlay = document.getElementById("imageOverlay"); | ||
overlay.addEventListener("click", function() { | ||
document.getElementById("imageOverlay").style.display="none"; | ||
|
||
}); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.