title: How to hide a row in jquery
body: <p>I got 10 records from the database so I just need to click on hide button then the particular row will be hidden not all data but in my code when I click on hide button then all data will be hidden. here is my code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
    $("#btn").click(function() {
      $(".hide_material").toggle();
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;tr&gt;
    &lt;th&gt;Material Name&lt;/th&gt;
    &lt;th&gt;Qty/Piece&lt;/th&gt;
    &lt;th&gt;Total&lt;/th&gt;
    &lt;th&gt;Action&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr class="hide_material"&gt;
    &lt;td&gt;
      &lt;?php echo $row-&gt;name; ?&gt;
    &lt;/td&gt;
    &lt;td&gt;
      &lt;?php echo $row-&gt;qty; ?&gt;
    &lt;/td&gt;
    &lt;td&gt;
      &lt;?php echo $total; ?&gt;
    &lt;/td&gt;
    &lt;td&gt;&lt;button type="button" id="btn" style="float:right; margin-right:25px; " class="btn btn-primary btn-xs"&gt;Show/Hide&lt;/button&gt;&lt;/td&gt;
  &lt;/tr&gt;</code></pre>
  </div>
  </div>
  </p>