Not contains jquery Finding whether a string contains another string can be achieved not using jQuery but plain ole JavaScript! Using the str. search'). contains function but that function is used to see if a DOM element is a descendant of another DOM element. 1. You should use includes instead. hide(); This obviously hides the ones that do contain the selected text. selector: A selector with which to filter by. contains() methods? – Terry Commented Dec 21, 2015 at 10:30 I don't think there is a . How to get exact string in UL LI using Jquery contains function. Use :contains(text) to find multiple elements with the given text string and use :not(:contains(text)) to get elements without the text. qqnjllgcmpaqgnzbwgfxcjkcsjbxcecgqzdmhdrsqxwvicrmzpivdrkjvhnvxpnakrbpqdbpbhktozlofmh