fadeOut bug/ decrementation implementation

You are very close. Your fadeOut callback has an event argument, the event object contains the child of #container that was actually clicked.

By adding the event argument to the callback function:

function fadeOut(event) 

Then using this event object to reference the source of the click:

let fadeTarget = document.getElementById("container");

becomes

let fadeTarget = event.target

Now you are running the fade function are the specific block. Maybe take a look at the event object that has been output to console for future reference.

I think this will get you want you want. Good luck!

https://jsfiddle.net/z6um1dpv/4/

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top