jQuery: Add Numbers into an Ordered List
<p>I would like to use jQuery to make this:</p>

<pre><code>&lt;ol&gt;
 &lt;li&gt;item a&lt;/li&gt;
 &lt;li&gt;item b&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
 &lt;li&gt;item c&lt;/li&gt;
 &lt;li&gt;item d&lt;/li&gt;
 &lt;li&gt;item e&lt;/li&gt;
&lt;/ol&gt;
</code></pre>

<p>…become this:</p>

<pre><code>&lt;ol&gt;
 &lt;li&gt;&lt;span&gt;1&lt;/span&gt; item a&lt;/li&gt;
 &lt;li&gt;&lt;span&gt;2&lt;/span&gt; item b&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;span&gt;1&lt;/span&gt; item c&lt;/li&gt;
 &lt;li&gt;&lt;span&gt;2&lt;/span&gt; item d&lt;/li&gt;
 &lt;li&gt;&lt;span&gt;3&lt;/span&gt; item e&lt;/li&gt;
&lt;/ol&gt;
</code></pre>

<p>(<a href="http://stackoverflow.com/questions/1571024/number-lis-using-jquery">This answer</a> doesn't work for when there are multiple <code>ol</code>s on the page; the number would increment across the <code>ol</code>s instead of starting from 1 for each individual <code>ol</code>.)</p>
