How Do I Find the Index of An Element Within an Array
<p>Say I have html similar to the following</p>

<pre><code>&lt;ul&gt;
  &lt;li&gt; hi &lt;/li&gt;
  &lt;li&gt; hoi &lt;/li&gt;
  &lt;li&gt; privyet &lt;/li&gt;
  &lt;li class="selected"&gt; bonjour &lt;/li&gt;
  &lt;li&gt; hallo &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>and I use jQuery to get all the <code>li</code> elements in the <code>ul</code></p>

<pre><code>$("ul li")
</code></pre>

<p>how can I get the index of the <code>li</code> element with the class <code>selected</code> within the jQuery array of <code>li</code> elements?</p>
