jQuery first Selector

Last Updated Jul 21, 2015, 12:00:06 PM





jQuery first Selector

jQuery first selectorselects the first matched element in the given list of HTML elements.

Note:

The :first pseudo-class is equivalent to :eq( 0 )

Syntax
Example HTML
jQuery

In the above example, we have 7 tr elements. Using the above jquery :first selector we can target the first selector and apply the required styles


Output
jQuery first selector
Try It Now

Other Advanced jQuery Selectors you might want to learn
jQuery Complete Selectors Reference

jQuery Selectors

jQuery Basic Selectors

jQuery Child Selectors

jQuery Content Filter Selectors


Sources and Credits

The content and methods in the tutorial has been referred and updated with jQuery API and The jQuery Foundation

Last Updated Jul 27, 2015, 02:00:00 AM