JSFiddle - React, Tailwind, and code Playground
HTML
<div class="result">
9
</div>
<div class="parag">
A score of blah means you're something.
</div>
CSS
div.result
{
width: 100%;
color: #eee;
background: #333;
font-size: 26px;
}
.parag
{
background: #333;
font-size: 26px;
color: #333;
}
JavaScript
result_val = 9;
if($(".result:contains(" + result_val + ")").length > 0 )
{
$(".parag").css("color", "#eee");
}