Using jQuery, how do I get the index of an element found in XML?
<p>I have an XML file setup like so:</p>

<pre><code>&lt;entry name="bob"&gt;&lt;/entry&gt;
&lt;entry name="ryan"&gt;&lt;/entry&gt;
&lt;entry name="joe"&gt;&lt;/entry&gt;
...
&lt;entry name="etc"&gt;&lt;/entry&gt;
</code></pre>

<p>Next, I have a line of code that picks out a name from the XML like so:</p>

<pre><code>var $user= $('entry[images="' + userName + '"]', xml);
</code></pre>

<p>But how do I find out what the index of $user is in the overall XML? Example: if userName was 'joe', I should get the number '2' back. Any suggestions?</p>
