In fact, they are completely different.
filter works with the relevant elements:
Reduce the set of matched elements to those that match the selector or pass a function test.
has based on the descendants of matching elements:
Reduce the set of matched elements to those who have a child that matches the selector or DOM element.
A practical example:
<span class="outer">outer span</span> <div class="outer"> outer div<br> <span>descendant span</span> </div>
$('.outer').filter('span'); //returns the outer span $('.outer').has('span'); //returns the outer div
Fiddle
Fabrício matté
source share