I need to use javascript only for this project. Sorry, no jQuery (I feel ashamed as well).

I am adding an addEventListener to a div. "Problem" is that it applies to all its children, too.

Is there a way to avoid this, and have the listener work only for that div?

Thankd in advance.


my code looks like this:

document.getElementById(myObj.id).addEventListener("mousedown", myObjDown, false);

function myObjDown() {
  //do stuff here
}
Edit
Report