jQuery – :last-child Selector
The :last-child selector selects all HTML elements of a specified type that are also the last child of their parent element.
The :last-child selector selects all HTML elements of a specified type that are also the last child of their parent element.
The :last-of-type selector selects all elements that are the last child of a specified type of their parent element.
The :nth-child() selector selects all specified elements that are the nth child of their parent, regardless of all the children’s types.
The :nth-last-child() selector selects all elements that are the nth child of their parent, regardless of all the children’s types, counting from the end.
The :nth-last-of-type() selector selects all elements that are the nth child of a specified type of their parent, counting from the last child.
The :nth-of-type() selector selects all elements that are the nth child of a specified type of their parent.
The :odd selector selects every element with an odd index number (1, 3, 5, etc.). This is often used to create a striped row look in HTML tables.
The :only-child selector selects every element that is the only child of its parent. If the parent has multiple child elements, it will NOT be selected.
The :only-of-type selector selects every element that is the only child of its type of its parent.
The Parent Descendant selector selects all elements that are descendants (child, grandchild, great-grandchild, etc) of a specified element.
The :parent selector selects all specified html elements that have child elements or text.
The Parent > Child selector selects all elements that are a direct child of the specified element.
The :password selector selects HTML form input elements with type=”password”.
The :reset selector selects HTML form input elements and button elements with type=”reset”.
The :root selector selects the document’s root element which is the html
tag.
The :submit selector selects HTML form input elements and button elements with type=”submit”.
The :selected selector selects option elements from a dropdown list that are preselected.