Select Elements with Index < n $(":lt(n)")

$(":lt(n)")

e.g. $("li:lt(2)")

$(":lt(n)") selects each element at index less than n within the matched set.

Example 1: $("li:lt(2)") will find <li> at index < 2 within the matched set.
<ul>
<li>a</li>// index = 0
<li>b</li>
<li>c</li>
</ul>
Example 2: $("div:lt(2)") will find <div> at index < 2 within the matched set.
<div id='someID'>div-1</div> // index =0
<p>p-1</p>
<div class='someClass'>div-2</div>// index =1
<p>p-2</p>
<div>div-3</div> // index =2
<span>span-1</span>
Matched set is a set of elements matching selector. For example, in Example 2 matchted set is set of elements matching $("div") selector
<div id='someID'>div-1</div> //index = 0
<p>p-1</p>
<div class='someClass'>div-2</div> //index = 1
<p>p-2</p>
<div>div-3</div> //index = 2
<span>span-1</span>
jQuery selector filter $(":lt(n)")