jQuery last Selector

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

jQuery last Selector

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

Note: :last selector, selects a single element by filtering the current jQuery collection and matching the last element within it.

Example HTML

In tha above jQuery :last selector example, we have 3tr elements. Using the above jquery :last selector we can target the last tr element and apply the green color to the text

jquery :last 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 21, 2015, 12:00:06 PM