Q:

Which selector is faster?

I'm searching for the existance of one matching selector.  Which is faster?
$('a[rel="something"]').first().length > 0)

or
$('a[rel="something"]').length > 0)

Thanks!

A:

$('a[rel="something"]').length > 0) should be faster because it does not have overhead of picking up (finding out) the first() element in the wrapped set $('a[rel="something"]').
And if you are targeting one element with $('a[rel="something"]'), using first() isn't needed anyway.

