title: Javascript showing all classes not just one
body: <p>Good day good people</p>
  
  <p>I have a bit of a conundrum</p>
  
  <p>I have javascript code that works as it supposed to 
  But when clicking the show all button it displays all the hidden items for all the classes and not just for the one you clicked</p>
  
  <p>Javascript code in php block</p>
  
  <pre><code>$(function () {
  $('.result".$h."').slice(0, 5).show();
  });
  $(document).ready(function () {
    $('span').click(function () {
          $('.result".$h."').slice(0, 1000).show();
          $('this').hide();
    });
  });
  </code></pre>
  
  <p>PHP Code Snippet</p>
  
  <pre><code>$h=1;
  
  foreach ($nbResult as $key =&gt; $brand) {
      echo "
      &lt;tr class='result".$h."' style='display:none; border-bottom: 1px solid #2f2f2f; align-right'&gt;
      &lt;td style='padding: 5px 0px 5px 0px; color: #2f2f2f'&gt;" . $brand['email'] . " &lt;/td&gt;
      &lt;/tr&gt;
      ";
      }
      echo "&lt;tr&gt;&lt;td&gt;&lt;span class='loadMore'&gt;SHOW ALL&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;";
  
  $h++;
  </code></pre>
  
  <p>Edit:
  Sorry I missed copying the incrementing</p>