title: How to get the child of a element with event.target
body: <p>I'm trying to get the child elements of a div to toggle a class 'active'</p>
  
  <p>JS</p>
  
  <pre><code>    const dots = document.querySelectorAll('[data-dots]');
      dots.forEach(dot =&gt; dot.addEventListener('click', handleClick));
  
      function handleClick(e) {
       e.target.getElementsByClassName('tb-drop').classList.toggle('active');
       console.log(e.target.getElementsByClassName('tb-drop'))
      }
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>       &lt;div class="dots" data-dots&gt;
           &lt;i class="fas fa-ellipsis-v dots"&gt;&lt;/i&gt;
           &lt;div class="tb-drop"&gt;
              &lt;i class="far fa-edit icon-grid"&gt;&lt;/i&gt;
              &lt;i class="fas fa-link icon-grid"&gt;&lt;/i&gt;
           &lt;/div&gt;
         &lt;/div&gt;
  </code></pre>
  
  <p>So i'm selecting all the divs with the data-dots attribute and then select the child of that div and add the class active. I tried with e.target.children but didnt work.</p>
  
  <p>Thanks, I'm just trying to learn :)</p>