jQuery first Method

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

jQuery first Method

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


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

Example HTML

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

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