jQuery :firstSelector
Definition and Usage
The :first selector selects the first element.
Note:This selector is only used to select a single element. Use:first-childthe selector to select multiple elements (one for each parent).
Most common usage: Used together with other selectors to select the first element in a specified combination (like the example above).
Tip:To select the last element in a specified combination, use:lastthe selector.
Syntax
$(":first")
Try it - Examples
Difference between :first and :first-child
Demonstrates the difference between the :first and :first-child selectors.
Other Extensions
jQuery Selectors