title: Jquery hide table column not containing value
body: <p>I'm trying to hide a row in a table if it does <em>not</em> contain a search value.</p>
  
  <p>This works:</p>
  
  <pre><code>&lt;table class="mytable"&gt;
      &lt;tr&gt;
          &lt;td&gt;1001&lt;/td&gt;
          &lt;td&gt;apples&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;1002&lt;/td&gt;
          &lt;td&gt;bananas&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;button id="mybutton"&gt;Button&lt;/button&gt;
  &lt;button id="mybutton2"&gt;Button2&lt;/button&gt;
  </code></pre>
  
  <p>This will work by hiding all rows, then showing the ones we want:</p>
  
  <pre><code>$('#mybutton').click(function(){
      $('.mytable td').parent().hide();
      $('.mytable td:contains("apples")').parent().show();
  });
  </code></pre>
  
  <p>But I've seen there's a more elegant (and probably efficient) solution using :not selector, but I can't get it working:</p>
  
  <pre><code>$('#mybutton2').click(function(){
      $('.mytable td:not(:contains("apples"))').parent().hide();
  });
  </code></pre>
  
  <p>How can I get this working using the :not selector, so that if a row does <em>not</em> contain apples, it will be hidden, leaving all the rows that contain apples.</p>
  
  <p>JS Fiddle: <a href="https://jsfiddle.net/ryy3tvob/" rel="nofollow">https://jsfiddle.net/ryy3tvob/</a></p>