title: Loop throught 2 array and use onclick for items
body: <p>i have a template with  repeating blocks , the idia is to toggle closet  .products_block every time when i click on .id_name , how can i do it ? For instance if i will click on third .id_name i want to toggle only third .products_block.</p>
  
  <p>i catch the elements </p>
  
  <pre><code>const elem  = document.getElementsByClassName('id_name');
  const prod  = document.getElementsByClassName('products_block');
  </code></pre>
  
  <p>make an arrays </p>
  
  <pre><code>const elemArray = Array.prototype.slice.call(elem)
  const prodArray = Array.prototype.slice.call(prod)
  
  &lt;div class="id_name"&gt;
       &lt;p&gt;onlcik&lt;/p&gt;
       &lt;div class="products_block"&gt;
           &lt;p&gt;show&lt;/p&gt;
       &lt;/div&gt;
   &lt;/div&gt;
  
  &lt;div class="id_name"&gt;
       &lt;p&gt;onlcik&lt;/p&gt;
       &lt;div class="products_block"&gt;
           &lt;p&gt;show&lt;/p&gt;
       &lt;/div&gt;
   &lt;/div&gt;
  
  ....
  </code></pre>