Hi. I’m having problems with the Event 3. I have tried to apply events to child elements but I doesn’t know how to do it. I have placed the code in CodePen. The URL is https://codepen.io/amapola-negra/pen/zYZqGGy. I would apreciate very much any help. Thanks in advance.
button bar is the div element then i set on click which mean any click on any part of it will trigger that event
by the e which is the event it self has many info about what it trigger this event so i get the target from it in case if it was one of the button then i get the attribute value and set it to be the background color if it not button or even it was anything that does not have this attribute then it will set the color to the default value which is white here