How to add a class to list where there is unordered list child with jquery?
<p>I would like to add a class called "with_ul" to li tags where there is ul under in the following normal list with jquery.</p>

<p>In the following case I need to add the class to list of Level 1-B, Level 2-B-1 and Level 1-C since they have an unordered list. </p>

<pre><code>   &lt;ul id="nav"&gt;
      &lt;li&gt;Level 1-A&lt;/li&gt;
      &lt;li&gt;Level 1-B
          &lt;ul&gt;
              &lt;li&gt;Level 2-B-1
                  &lt;ul&gt;
                      &lt;li&gt;Level 3-B-1&lt;/li&gt;
              &lt;/li&gt;
              &lt;li&gt;Level 2-B-2&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Level 1-C
          &lt;ul&gt;
              &lt;li&gt;Level 2-C-1&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
...
...
&lt;/ul&gt;
</code></pre>

<p>Thanks in advance.</p>
