Skip to content

Commit

Permalink
fix click to zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
zzq0826 committed Mar 22, 2024
1 parent 8e0a8fe commit 1422771
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/click-to-zoom.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
document.addEventListener("DOMContentLoaded", () => {
document.querySelectorAll(".click-to-zoom").forEach((element: HTMLImageElement) => {
document.addEventListener("astro:page-load", () => {
document.addEventListener("astro:page-load", () => {
document.querySelectorAll(".click-to-zoom").forEach((element: HTMLImageElement) => {
element.addEventListener("click", () => {
if (element.classList.contains("expanded")) return

Expand Down

0 comments on commit 1422771

Please sign in to comment.