Bubbling and capturing

FROM HERE Another excellent article explaining even more detail. DOM elements can be nested inside each other. And somehow, the handler of the parent works even if you click on it’s child. The reason is event bubbling. For example, the following DIV handler runs even if you click a nested tag like EM or CODE:…