A Pen by Damon Tian

This awesome code was written by damontian1, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright damontian1 ©
  • HTML
  • CSS
  • JavaScript
    <div class="outer">
  <div class="middle">
    <div class="inner">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Optio nesciunt, hic dicta error voluptatum explicabo vel quisquam reiciendis voluptates at illo sunt, quidem consectetur dolore. Quia sint necessitatibus soluta fugiat!</div>

/*Downloaded from https://www.codeseek.co/damontian1/a-pen-by-damon-tian-MGwvKP */
    div {border: 1px solid black; padding: 1rem;}

/*Downloaded from https://www.codeseek.co/damontian1/a-pen-by-damon-tian-MGwvKP */
    var divs = document.querySelectorAll("div");

divs.forEach(div => {
  div.addEventListener("click", function(e) {
    var thiis = this;
    var eTarget = e.target
    console.log({thiis, eTarget})