jQuery – .class Selector
The .class selector selects all HTML elements with a specific class, which may include multiple elements on the page.
The .class selector selects all HTML elements with a specific class, which may include multiple elements on the page.
The :contains() selector selects elements containing a specified string directly within it or indirectly in a child, grandchild, etc. of the element.
The :disabled selector selects all HTML form elements that are disabled.
The element selector selects all HTML elements with a specific element tag name.
The element + next selector selects the very next element specified after (not within) the first specified element.
The element ~ siblings selector selects sibling elements that appear after the specified element. Both of the specified elements must share the same parent.
The :empty selector selects empty HTML elements, which means an element without any child elements or text.
The :even selector selects every element with an even index number (0, 2, 4, etc.). This is often used to create a striped row look in HTML tables.
The :first-child selector selects all HTML elements of a specified type that are also the first child of their parent element.
The :first-of-type selector selects all elements that are the first child of a specified type of their parent element.
The :has() selector selects all elements that have one or more elements inside of them that matches the specified selector.
The :header selector selects all header elements – h1, h2, h3, h4, h5, and h6.
The :hidden selector selects hidden elements (display: none, form elements with type=hidden, elements with zero width/height, child with a hidden parent).
The #id selector selects an HTML element with a specific id. HTML only allows for one unique #id per document.
The :lang() selector selects all elements with the language attribute starting with a specified value (e.g., lang=”en” or lang=”en-us”).