jQuery :lt() Selector (original) (raw)
Last Updated : 11 Jul, 2025
The jQuery :lt() selector selects elements using an index number that works on less than a specified number. The index numbers start from 0.
Syntax:
$(":lt(index)")
Parameter:
- index: Index number which is selected. The element which is lesser than the specified index number is selected.
Example 1: In this example, we are using it() selector.
HTML `
jQuery :lt() SelectorWelcome to My Web Page
- GEEKS
- FOR
- GEEKS
- GEEKS
- FOR
- GEEKS
- GEEKS
- FOR
- GEEKS
- GEEKS
- FOR
- GEEKS
`
Output:
Example 2: Here is another example of it() selector.
HTML `
jQuery :lt() SelectorjQuery | :lt() Selector
- GEEKS
- FOR
- GEEKS
- GEEKS
- FOR
- GEEKS
- GEEKS
- FOR
- GEEKS
- GEEKS
- FOR
- GEEKS
Change color
`
Output:

