title: Filter elements out of a jquery object based on text content
body: <p>I am trying to use <code>contains</code> with 'this' keyword, but it is giving an error.</p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$(function(){
      var check=$('ul').find('li').filter(function(){
          return $(this:contains('two')).css('color','red')
      })
  })
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;ul&gt;
      &lt;li id="one"&gt;one&lt;/li&gt;
      &lt;li id="two"&gt;two&lt;/li&gt;
      &lt;li id="one"&gt;one&lt;/li&gt;
      &lt;li id="two"&gt;two&lt;/li&gt;
      &lt;li id="one"&gt;one&lt;/li&gt;
      &lt;li id="two"&gt;two&lt;/li&gt;
      &lt;li id="one"&gt;one&lt;/li&gt;
      &lt;li id="two"&gt;two&lt;/li&gt;
      &lt;li id="one"&gt;one&lt;/li&gt;
      &lt;li id="two"&gt;two&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>