jQuery: determine if a <li> contains a <ul>
<p>I have some HTML code that contains nested <code>&lt;ul&gt;</code> elements and I need to add a class 'parent' to each <code>&lt;li&gt;</code> element that contains a child <code>&lt;ul&gt;</code>. There could be more than one element contained directly withing a single <code>&lt;li&gt;</code>, e.g:</p>

<pre><code>&lt;li&gt;
    &lt;a&gt;...&lt;/a&gt;
    &lt;span&gt;...&lt;/span&gt;
    &lt;ul&gt;...&lt;/ul&gt;
&lt;/li&gt;
</code></pre>

<p>All I need is to determine if a particular <code>&lt;li&gt;</code> contains a <code>&lt;ul&gt;</code> as a child element.</p>

<p>How would I go about this?</p>
