#jQuery :contains() : contains () is a selector that selects elements that contain a particular string. grammar $( ':contains(text)' ) Keep in mind that it is case sensitive when choosing whether to include strings. for example $( 'p:contains("ab")' ) Select the p element that contains the ab string. example Lorem ipsum dolor sit amet. Aenean nec mollis jb nulla. Phasellus JB lacinia tempus maur..