From d480bcf962a8628e938d56c66c0cd73ffaa96b58 Mon Sep 17 00:00:00 2001 From: zepp Date: Mon, 28 Oct 2024 09:17:28 -0400 Subject: [PATCH] Added functionality to close button --- js/script.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/script.js b/js/script.js index d79bd33..eec56bd 100644 --- a/js/script.js +++ b/js/script.js @@ -4,7 +4,6 @@ let descriptions = { "baxter-stare.png": "Baxter lovingly staring at the camera on a sunny day in the apartment. One of my favorite photos of him. He would have been 6 or 7 around this time.", }; - icon.forEach((item) => { item.addEventListener("click", () => { @@ -70,5 +69,13 @@ icon.forEach((item) => { let = aboutThisCat = document.querySelector(".site-info"); aboutThisCat.style.gridColumn = "2"; desktop.appendChild(imageWindow); + + closeButton.addEventListener("click", () => { + imageWindow.remove(); + document.querySelector(".window").style.display = "block" + }); + + + }); }); \ No newline at end of file