Giving html list elements that only contain a specified text a background color using Jquery
<p>I have the following html script:</p>

<pre><code>&lt;ul&gt;
&lt;li class="container"&gt;
&lt;div class="age"&gt;24&lt;/div&gt;
&lt;div class="married"&gt;no&lt;/div&gt;
&lt;/li&gt;

&lt;li class="container"&gt;
&lt;div class="age"&gt;27&lt;/div&gt;
&lt;div class="married"&gt;yes&lt;/div&gt;
&lt;/li&gt;

&lt;li class="container"&gt;
&lt;div class="age"&gt;56&lt;/div&gt;
&lt;div class="married"&gt;&lt;!--empty--&gt;&lt;/div&gt;
&lt;/li&gt;

&lt;li class="container"&gt;
&lt;div class="age"&gt;34&lt;/div&gt;
&lt;div class="married"&gt;no&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>I would like that only the <code>li</code> elements that contain a <code>no</code> in their <code>div.married</code> get a green background using Jquery.</p>

<p>I don't understand why <a href="http://jsbin.com/urodit/144/edit" rel="nofollow">this code</a> does not work. How do I get the intended result?</p>
