How to get li's id's of a ul that is under li ? my code goes like below
<pre><code>&lt;li style="list-type:none;"&gt;1
&lt;ul&gt;
&lt;li style="list-type:none;"&gt;1&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li style="list-type:none;"&gt;2
&lt;ul&gt;
&lt;li style="list-type:none;"&gt;1&lt;/li&gt;
&lt;li style="list-type:none;"&gt;2&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;


&lt;script type="text/javascript"&gt;
var targetListId = this.currentItem[0].parentNode.id;
var targetlistlength =
document.getElementById(targetListId).getElementsByTagName("li").length;
&lt;/script&gt;
</code></pre>

<p>i want index of li that is having ul .  but the thing is when any li is moving it is getting the top most li only . i want the nth li id</p>
