diff --git a/cafe-events/valentines-day-25/index.html b/cafe-events/valentines-day-25/index.html index 5b05f44..4dd827d 100644 --- a/cafe-events/valentines-day-25/index.html +++ b/cafe-events/valentines-day-25/index.html @@ -9,9 +9,7 @@
-

- For you, Emma -

+

For you, Emma

@@ -55,7 +53,7 @@
- + diff --git a/cafe-events/valentines-day-25/js/script.js b/cafe-events/valentines-day-25/js/script.js index 41d80d2..5fc1957 100644 --- a/cafe-events/valentines-day-25/js/script.js +++ b/cafe-events/valentines-day-25/js/script.js @@ -14,16 +14,36 @@ const notesForEmma = { }; const note = document.querySelector(".read-this"); -const tiles = document.querySelectorAll(".tile"); + note.addEventListener("click", () => { + const tiles = document.querySelectorAll(".tile"); + tiles.forEach((el) => { el.addEventListener("click", () => { displayNote(el); }); }); + + const transHeart = document.querySelector(".trans-pride-heart"); + transHeart.style.cursor = "pointer"; + transHeart.addEventListener("click", extraLove); }); const displayNote = (noteName) => { console.log(`${notesForEmma[noteName.className.split(' ')[0]]}`); -}; \ No newline at end of file +}; + +const extraLove = () => { + const header = document.querySelector(".header-text"); + header.innerHTML += `. Always + + + + +`; + + const transHeart = document.querySelector(".trans-pride-heart"); + transHeart.style.cursor = "default"; + transHeart.removeEventListener("click", extraLove); +} \ No newline at end of file