Select next element in the page source using jQuery
<p>I have an arbitrarily deep list of the form:</p>

<pre><code>&lt;ul&gt;
 &lt;li&gt;&lt;/li&gt;
 &lt;li&gt;
  &lt;ul&gt;
   &lt;li&gt;&lt;/li&gt;
  &lt;/ul&gt;
 &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>I am trying to build a function "nextElement" that returns a jQuery selector.</p>

<p>The first time the function is called, it returns the first li in the list.  The second time it is called, it returns the next li in the page.  Etc.  </p>

<p>I'd like this function to pay no attention to siblings, parents, children, etc.  All I care about is that everytime it is called, the next li in the source gets chosen.</p>

<p>Any suggestions on how to go about approaching this?</p>

<p>Thanks</p>
