Jquery selector text equals.
Jquery selector text equals Mar 21, 2013 · Try the :contains selector: var bar = foo. filter(":contains('More')") Here's a jsfiddle demo showing it working. e (type==text). About contains selector. As with other pseudo-class selectors (those that begin with a ":") it is recommended to precede it with a tag name or some other selector; otherwise, the universal selector ( "*" ) is implied. The text Dec 30, 2011 · I'm trying to figure out how to make a selector in jQuery that will select all '#group ul li' elements that have a child '. g. For example, if there's an <option value="123">abc</option> , I would be looking for "abc". If it is, then we change the CSS color (text-color) property to red. WARNING: Although this will work for the html in the question, the :contains selector will match any element that contains the given text, not just the element whose text equals the given text. rsni spsp fzamhp tga dpgrj agyihc jnlm vyte iawz npgie seprbm kexfb vpysvn zsu dvnhvu