JQuery, a new Selection using the results
<p>Is there a way to me do this?</p>

<pre><code>&lt;img id="example" src="anything.jpg" title="something" class="abc" /&gt;
</code></pre>

<hr>

<pre><code>$('.abc').each(function(){

   //test if this result is something
   if( $(this)...(???)...('[src^=anything]')) == 'anything.jpg'){

   }

   //another Jquery selector test for this one    
   if( $(this)...(???)...('#example').size() &gt; 0){

   }


});
</code></pre>

<p>This is just an example, what I need is pretty more complex.. But I would like to know if there is a way to make other jQuery selector test in the result of a first selector.. since "find" will find the children of $(this).. and .parent() get alot of brothers..</p>

<p>See what I mean?
Do you have any idea?</p>

<hr>

<hr>

<p>So sorry.. let me try again.. </p>

<p>$('div').each(); </p>

<p>get all "div", right? </p>

<p>But now in that function I need to make another "test" check if div class is "red" or "blue".. </p>

<p>See? </p>

<p>I need to test something else of the result based in Jquery selector.. </p>

<p>I know I could do: </p>

<p><code>class = $(this).attr('class');</code> and <code>then if(class=="blue"){}</code> .. But I would like to do <code>$('this[class=blue]').size()&gt;0){}</code></p>
