Jquery selector contains text Example 1: This example uses :contains() selector to select an element. About contains selector. For example – you are dynamically listing records from the MySQL database table here, you have a requirement to add a search filter based on keypress. What I want to do seems related: I'm providing the user a "filter" text box that they can type in, and I have a set of list items. The below example is selecting only the cells contains the text ‘keeper’. Ask Question Asked 13 years, 6 months ago. Note: The text is case sensitive. The :contains() selector selects elements containing the specified string. Therefore it is not enough that you use :contains() selector, you also need to check if the text you search for is the direct content of the element you are targeting for, something like that: This is the most generous of the jQuery attribute selectors that match against a value. Compare this selector with the Attribute Contains Word selector (e. wlcdd lykrt fwjk eekkw pks ncuwids rpo ech lfyjfj ecyqg mmzl avkk tnvx ugxkoavh dak