I came here from this tutorial on Kirupa’s channel.
It deals with Event Delegation. I would really appreciate it if someone could help me with my question here:
I am working on a chat app. Each chat element has children of its own. And all the chats are inside of a chatContainer.
Now, if I add the event listener to the chatContainer, how do I execute the callback only on the parent element(chat) even though the event was triggered by one of its children(chatChild)?