What is the jQuery equivalent of querySelector? The only way I've found so far is to select all then pick the first selection:
$(selectorString)[0]
With the above expression, is jQuery smart enough to stop after finding the first match?
Update: @Mutnowski suggested using eq() and first, but after reading the jQuery documentation those two methods seem to have the same drawback: jQuery will first get all matches, then only filter out the first element.
$("td").eq(2)
instead of$("td:eq(2)")
– Pyrotechnics