Are jQuery's :first and :eq(0) selectors functionally equivalent?
- by travis
I'm not sure whether to use :first or :eq(0) in a selector. I'm pretty sure that they'll always return the same object, but is one speedier than the other?
I'm sure someone here must have benchmarked these selectors before and I'm not really sure the best way to test if one is faster.
Update: here's the bench I ran:
/* start bench */
for (var…