Jquery find class with a certain text and change the css of the parent class if conditions are true
<p>I am trying to achieve the following using Jquery but I am not sure how to go about doing it. Any help would be greatly appreciated. Thank you.</p>

<pre><code>&lt;script&gt;
$a = array(1,2);

if ($('.box:contains($a)')){
    $('.inbox' //the .inbox where .box text = $a).css(//something);
}

&lt;/script&gt;

&lt;body&gt;
&lt;div class='inbox'&gt;
    &lt;div class='box'&gt;1&lt;/div&gt;
&lt;/div&gt;

&lt;div class='inbox'&gt;
    &lt;div class='box'&gt;2&lt;/div&gt;
&lt;/div&gt;

&lt;div class='inbox'&gt;
    &lt;div class='box'&gt;3&lt;/div&gt;
&lt;/div&gt;
</code></pre>
