JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
<a href='one.href'>one</a>
<a href='two.href'>two</a>
<a href='three.href'>three</a>
CSS
ul { margin: 20px; }
li { display: block; float: left; margin: 5px; padding: 5px; background-color: #aaa; }
a { display: block; float: left; margin: 5px; padding: 5px; background-color: #eee; }
html .hilite { background-color: #ff0; }
JavaScript
jQuery(function($) {
var findText = 'two';
$('*').filter(function() {
return $(this).children().length < 1 && $(this).text().indexOf(findText) >= 0;
}).addClass('hilite');
});