jQuery :last-child Selector

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





jQuery :last-child Selector

jQuery last-child selector is used to select all the last-child elements of its parent.

Syntax
Note: :last matches only a single element, :last-child can match more than one: one for each parent. Example

Find the last span in each matched div and add some css hover effect.



Output
jquery last-child selector

Try It Now

All jQuery Child Selectors
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