Great explanation, Jonathan.

> It does. The difference between .filter() and .find() is that the former
> searches through the matched elements, while the latter searches through the
> *descendants* of the elements. I believe that when you say:

> Given the HTML:
>   <div class="foo bar">Test</div>
>
> $('div.foo') selects the element
> $('div').filter('.foo') selects the element
> $('div').find('.foo') does not select the element
>
> similarly,
> $('.foo.bar') selects the element
> $('.foo').filter('.bar') selects the element
> $('.foo').find('.bar') does not select the element

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to