How can I get the index of non-sibling elements in jquery?
<p>HTML:</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;Help&lt;/li&gt;
    &lt;li&gt;me&lt;/li&gt;
    &lt;li&gt;Stack&lt;/li&gt;
    &lt;li&gt;Overflow!&lt;/li&gt;
&lt;/ul&gt;

&lt;br&gt;

&lt;ul&gt;
    &lt;li&gt;Can&lt;/li&gt;
    &lt;li&gt;I&lt;/li&gt;
    &lt;li&gt;connect&lt;/li&gt;
    &lt;li&gt;these?&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>Javascript/JQuery:</p>

<pre><code>$("li").live('click', function(){

alert($(this).index());

});
</code></pre>

<p>I put together a simple jsfilled page to help describe my problem: <a href="http://jsfiddle.net/T4tz4/" rel="nofollow">http://jsfiddle.net/T4tz4/</a></p>

<p>Currently clicking on an LI alerts the index relative to the current UL group. I'd like to know if it was possible to get a 'global index' so that clicking on "Can" returns the index value of 4.</p>

<p>Thank you,
John</p>
