Closed winishahines closed 8 years ago
Hi Winisha, can you include a snippet of code where you are adding the event listeners? The link goes to your deployed site. Looks great btw!
So just looking at the current js code in script.js
looks like all the events for the particular div
being created on line 39 are firing correctly. I guess my question is what is are you expecting to happen?
I would log the value of this
inside your changeBackgroundToColor
functions. You could you use that value in order to change the appropriate element's color.
I'm trying to figure out a way to edit the code that appears on lines 56 and 59 so that a color change will happen when mousing over each individual div. I need to be able to select each div that's housed within document.body. Any suggestions?
Currently on those events you are changing the body'
s background-color. Going to refer to my previous suggestion:
I would log the value of
this
inside yourchangeBackgroundToColor
functions. How could you use that value in order to change the appropriate element's color?
I tried adding mouseover and mouseout functionality to my game. I'd like to add it to each div but I could only figure out how to add it to the entire body. My repo link is here and my question is about lines 53-60.