Selects all header elements ( to ).
Selects all elements with the language attribute starting with a specified value. Note: The value has to be a whole word, either alone, like lang="en", or followed by a hyphen( - ), like lang="en-us".
Select all elements with a lang attribute value that starts with "de":
$("p:lang(de)")
Selects all elements except the specified element. This is mostly used together with another selector to select everything except the specified element in a group (like in the example below).
Select all elements except those with :
$("p:not(.intro)")
Selects the document's root element. In HTML, the root element is always the element.
Set the background color for the HTML document to blue: $(":root").css("background-color", "blue");
Selects the target element indicated by the fragment identifier of the document's URI. This kind of URI ends with a "number sign" (#) followed by an anchor identifier (called the fragment identifier).
Select this URL's URI https://example.com/#foo $(":target")
Selects elements containing the specified string. The string can be contained directly in the element as text, or in a child element. This is mostly used together with another selector to select the elements containing the text in a group (like in the example below).
Select all elements containing "share": $("button:contains(share)")
Selects empty elements. An empty element is an element without child elements or text.
Select all empty elements: $(":empty")
Selects all elements that have one or more elements inside of them, that matches the specified selector.
Select all elements that have a element inside of them: $("p:has(span)")
Selects all elements that are the parent of another element, including text nodes.
Select all elements with children, including text: $("td:parent")
Show hidden elements:
$("p:hidden").show();