Get background to change on mouseover
This commit is contained in:
parent
ad87353175
commit
d6ff416979
1 changed files with 2 additions and 4 deletions
|
|
@ -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";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue