Select all elements in between two tags of the same type?
<p>How could i select all the elements between two tags of the same type using javascript or jquery?</p>

<p>For examle if i had:</p>

<pre><code>&lt;h1&gt;&lt;/h1&gt;
&lt;h2&gt;&lt;h2&gt;
&lt;li1&gt;&lt;/li1&gt;
&lt;li2&gt;&lt;/li3&gt;
&lt;li3&gt;&lt;/li4&gt;
&lt;h2&gt;&lt;/h2&gt;
</code></pre>

<p>How could i get all the <code>&lt;li&gt;</code>?</p>

<p>I tried using this <code>$units=$(this).nextuntil("h2");</code> but it didn't work</p>
