diff --git a/script.js b/script.js index 6955e73..a30685e 100644 --- a/script.js +++ b/script.js @@ -21,15 +21,13 @@ function createGrid() { const gridItems = document.querySelectorAll(".grid"); gridItems.forEach((item) => { - item.addEventListener("mouseover", () => { - console.log("Sup!"); - }); + item.addEventListener("mouseover", colorGrid); }); } function colorGrid() { - container.style.background = "blue"; + this.style.background = "blue"; }