title: How do I make jQuery Contains case insensitive, including jQuery 1.8+?
body: <p>I'm trying to use "contains" case insensitively. I tried using the solution at the following stackoverflow question, but it didn't work:</p>
  
  <p><a href="https://stackoverflow.com/questions/187537/is-there-a-case-insensitive-jquery-contains-selector/187557#187557">Is there a case insensitive jQuery :contains selector?</a></p>
  
  <p><em>For convenience, the solution is copied here:</em></p>
  
  <pre><code>jQuery.extend(
          jQuery.expr[':'], { 
                  Contains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())&gt;=0" 
  });
  </code></pre>
  
  <p><em>Here is the error:</em></p>
  
  <pre><code>Error: q is not a function
  Source File: /js/jquery-1.4.js?ver=1.4
  Line: 81
  </code></pre>
  
  <p><em>Here's where I'm using it:</em></p>
  
  <pre><code>  $('input.preset').keyup(function() {
      $(this).next().find("li").removeClass("bold");
      var theMatch = $(this).val();
      if (theMatch.length &gt; 1){
        theMatch = "li:Contains('" + theMatch + "')";
        $(this).next().find(theMatch).addClass("bold");
      }
    });
  </code></pre>
  
  <p>My use of the original case sensitive "contains" in the same scenario works without any errors. Does anyone have any ideas? I'd appreciate it.</p>