Select First Matching Element .first()

.first()

e.g. $("div").first()

$("selector").first() selects first element in the matched set.

Example 1: $("div").first() will first find all <div> then filter them by selecting first matching element i.e. first div.
<p>p-1</p>
<div id='someID'>div-1</div>
<div class='someClass'>div-2</div>
<div>div-3</div>
<span>span-1</span>
Matched set is a set of elements matching selector. For example, in Example 1 matchted set is set of elements matching $("div") selector
<p>p-1</p>
<div id='someID'>div-1</div> //index = 0
<div class='someClass'>div-2</div> //index = 1
<div>div-3</div> //index = 2
<span>span-1</span>
jQuery traversing filtering .first()