title: toggle class for the clicked element queryselectorAll
body: <p>I want to expand a div <code>onclick</code> the problem is it expands every other div with the same class</p>
  <pre><code>&lt;div class=&quot;formations div&quot;&gt;
            &lt;div class=&quot;buttn&quot; @click=&quot;expand&quot;&gt;
                &lt;p&gt;Formations&lt;/p&gt;&lt;i class=&quot;fas fa-chevron-right&quot;&gt;&lt;/i&gt;
            &lt;/div&gt;
            &lt;div class=&quot;link&quot;&gt;
                &lt;a&gt;link&lt;/a&gt;
                &lt;a&gt;link&lt;/a&gt;
                &lt;a&gt;link&lt;/a&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;Evolution div&quot;&gt;
            &lt;div class=&quot;buttn&quot;&gt;
                &lt;p&gt;Evolution &amp; Carrieres&lt;/p&gt;&lt;i class=&quot;fas fa-chevron-right&quot;&gt;&lt;/i&gt;
            &lt;/div&gt;
            &lt;div class=&quot;link&quot;&gt;
                &lt;a&gt;link&lt;/a&gt;
                &lt;a&gt;link&lt;/a&gt;
                &lt;a&gt;link&lt;/a&gt;
            &lt;/div&gt;
        &lt;/div&gt;
  </code></pre>
  <p>js:</p>
  <pre><code>expand(){
          let links= document.querySelectorAll(&quot;.link&quot;)
          for(let i = 0; i&lt; links.length; i++){
              links[i].classList.toggle('show');
          }
  </code></pre>
  <p>I tried other solutions but i couldn't fix the issue</p>