Say I have html similar to the following
<ul>
<li> hi </li>
<li> hoi </li>
<li> privyet </li>
<li class="selected"> bonjour </li>
<li> hallo </li>
</ul>
and I use jQuery to get all the li elements in the ul
$("ul li")
how can I get the index of the li element with the class selected within the jQuery array of li elements?