 <p>Simply use the <code>filter()</code> method of the jQuery object:</p> <pre><code>var active = c.filter('.active'); </code></pre> <p><a href="http://jsfiddle.net/davidThomas/aZUWg/" rel="nofollow">JS Fiddle proof-of-concept</a>.</p> <p>Reference:</p> <ul> <li><a href="http://api.jquery.com/filter/" rel="nofollow"><code>filter()</code></a>.</li> </ul>