How can I find out the number ul elements in the path of a li element?
<p>For example, I have the following html content, using jquery, how do I find out the number of ul element from the li text of a2? I'm sure closest method can accomplish this but how if you don't know in advance how many ul are there...</p>

<pre><code>&lt;ul id="ul_first"&gt;
     &lt;li&gt;a&lt;/li&gt;
     &lt;li&gt;b&lt;/li&gt;
     &lt;li&gt;c&lt;/li&gt;
     &lt;li&gt;d&lt;/li&gt;
     &lt;li&gt;c
              &lt;ul id="ul_second"&gt;
                           &lt;li&gt;a2&lt;/li&gt;   &lt;------- From here, this li has two ul element
                           &lt;li&gt;b2&lt;/li&gt;
                           &lt;li&gt;c2&lt;/li&gt;
                           &lt;li&gt;d2&lt;/li&gt;
              &lt;/ul&gt;    
     &lt;/li&gt;
 &lt;/ul&gt;
</code></pre>
