Checking to see if a div contains a ul, and then applying a style to the div
<p>I have a sceanrio where i want to change the styling of a div IF it contains a UL. Basically, it's an error panel, displaying at the top of the form. If the user has triggered one error, the text is aligned center, if the user has triggered a number of errors, then i want a ul to displayed but want the text aligned to the left.</p>

<p>I've tried the following but it doesn't seem to work - any tips would be appreciated.</p>

<p>Thanks</p>

<pre><code>$('.validationSummary').has('ul').css('text-align', 'left');
</code></pre>



<pre><code>&lt;div class="validationSummary"&gt;Please correct the errors highlighted below
&lt;ul&gt;
&lt;li&gt;Error 1&lt;/li&gt;
&lt;li&gt;Error 2&lt;/li&gt;
&lt;li&gt;Error 3&lt;/li&gt;
&lt;li&gt;Error 4&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</code></pre>
