JSFiddle - React, Tailwind, and code Playground
by Ken Z
HTML
<div> <!-- NOT THIS -->
<h1>Magical ponies</h1> <!-- NOT THIS -->
<ul> <!-- NOT THIS -->
<li>Fluttershy</li> <!-- NOT THIS -->
<li>Pinkie pie</li> <!-- NOT THIS -->
<li>Twilight sparkle</li> <!-- THIS -->
<li>Hurdurrdurr</li> <!-- NOT THIS -->
</ul>
</div>
<div>Twilight is a movie too</div> <!-- THIS -->
<p>Hurr durr <!-- NOT THIS -->
<span>Twilight <span>ZONE</span></span> <!-- THIS -->
Durr</p>
JavaScript
$('*').contents().filter(function(){return this.data && this.data.match(/Twilight/g);}).parent().css('border-left', '1px solid purple');