Finding li number in an ordered list
Hi all. Is there an efficient way (ie. not looping through all members and counting) to find out what number an li will get in an ordered list? For example:
<ol>
<li id="first">First</li>
<li id="second">Second</li>
</ol>
Naturally #first and #second will be 1 and 2, respectively. Without looping though all children of ol and counting, can I determine the number for #first and #second?
Thanks.
-Jeff