title: Simple case insensitive search box for a table with jQuery
body: <p>I'm tyring to make a simple sorting search box for a table.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>&lt;input name="search" /&gt;
  &lt;table id="content"&gt;
      &lt;tr class="item"&gt; (...) &lt;/tr&gt;
      &lt;tr class="item"&gt; (...) &lt;/tr&gt;
  &lt;/table&gt;
  
  $(document).ready(function(){
      $('input[name="search"]').keydown(function(){
      $('tr.item:contains("' + $(this).val()+ '")').prependTo('#content');
  });
  </code></pre>
  
  <p>This works fine, but .contains() is case sensitive.</p>
  
  <p>How can I make it case insenstive?</p>
  
  <p>I found this on the net:</p>
  
  <p><a href="http://bugs.jquery.com/ticket/278#comment:4" rel="nofollow">http://bugs.jquery.com/ticket/278#comment:4</a></p>
  
  <p><a href="http://ericphan.info/blog/2009/3/4/jquery-13-case-insensitive-contains.html" rel="nofollow">http://ericphan.info/blog/2009/3/4/jquery-13-case-insensitive-contains.html</a></p>
  
  <p>but when I add the following code:</p>
  
  <pre><code>$.extend($.expr[":"], {
    "containsIgnoreCase": function(elem, i, match, array) {
       return (elem.textContent || elem.innerText || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) &gt;= 0;
  }});
  </code></pre>
  
  <p>nothing seems to change and my search box remains case sensitive...</p>