John Resign
George Martin
Malcom John Sinclair
J.Ohn
1. :contains(text)
Select elements with text content "text"
$("div:contains('John')").addClass("highlight"); //Find all div elements containing "John"
2. :empty
Select an empty element that does not contain any child elements or text
Use the chrome browser to inspect the element and you will find that the class style of the div empty has been changed
$("div:empty").addClass("highlight ");
3. :has(selector)
Select the element containing the element matched by the selector
$("div:has(p)").addClass("highlight") ; //Find all div elements containing p
4. :parent
Select element tags containing child elements or text
$("div:parent").addClass(" highlight"); //Find all div elements containing child elements or text