Can you please explain how to apply a class to the child elements of this?
I am looking to give a different background color to all Compliant items.
For example:
<div class="tab">
<tr><td class="compliance">Compliant</td></tr>
<tr><td class="compliance">Non-compliant</td></tr>
</div>
$(".tab td:contains('Compliant')").each(function () {
$(this, .compliance).addClass( "success" );
});