Added functionality to close button

This commit is contained in:
emma 2024-10-28 09:17:28 -04:00
parent 1325c5554e
commit d480bcf962
1 changed files with 8 additions and 1 deletions

View File

@ -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.", "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) => { icon.forEach((item) => {
item.addEventListener("click", () => { item.addEventListener("click", () => {
@ -70,5 +69,13 @@ icon.forEach((item) => {
let = aboutThisCat = document.querySelector(".site-info"); let = aboutThisCat = document.querySelector(".site-info");
aboutThisCat.style.gridColumn = "2"; aboutThisCat.style.gridColumn = "2";
desktop.appendChild(imageWindow); desktop.appendChild(imageWindow);
closeButton.addEventListener("click", () => {
imageWindow.remove();
document.querySelector(".window").style.display = "block"
});
}); });
}); });