Jquery: Checking to see if div contains <a href class="nodeSel">, then add style to div
<p>I'm tring to add class to div, which contains <code>&lt;a href class="nodeSel"&gt;</code> marker:</p>

<ol>
<li><p>no active inside
<code>&lt;div id="menufirst" class="dtNode"&gt;&lt;img src="empty.gif"&gt;&lt;img alt="" src="empty.gif"&gt;&lt;img asrc="empty.gif"&gt;&lt;a href="http://www.sample1.com" class="node"&gt;title1&lt;/a&gt; &lt;/div&gt;</code></p></li>
<li><p>active inside
<code>&lt;div id="menufirst" class="dtNode"&gt;&lt;img src="empty.gif"&gt;&lt;img alt="" src="empty.gif"&gt;&lt;img src="empty.gif"&gt;&lt;a href="http://www.sample2.com" class="nodeSel" &gt;title2/a&gt; &lt;/div&gt;</code></p></li>
</ol>

<p>I tried:
<code>$('div.dtNode:has(a)').css('background','red').addClass("test");
  $('div#menufirst:has(a)').addClass("test2").css('background','red');
</code></p>

<p>and css:
<code>div.dtNode[class*="nodeSel"] { background:green; }</code></p>

<p>No effect. Could you please let me know what is wrong?</p>
