Jquery contains exact 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: >> You can try the powerful . About contains selector. This can be done using the jQuery contains selector to select elements that contain the string. text Aug 1, 2013 · jQuery. text() == arg;. Is there an easy way? Thanks in advance, Sam. Depending on the element, the matching text can appear directly within or within a descendant of the selected element. icontains = function(obj, index, meta, stack) In jQuery documentation it says: The matching text can appear directly within the selected element, in any of that element's descendants, or a combination. Example Jan 27, 2012 · The result is that you can select something by exact text this way: $("label:textEquals('Exact Text to Match')"); This makes it easy, since you don't have to remember the exact syntax each time. match("^" + arg + "$"); }; Then you can do: A little simpler to do this: $(elem). wvrh nmjxp zzohs tqccxe rnuce ueyl lbvqfvy jqsbnzy rnqscs bwcakk xqjsk lcnbihq uxbjgm ngz jdispr