This question already has an answer here:
- Determining child index in it's parent [duplicate] 1 answer
How can you get the child number of the selected element, e.g.
<ul>
<li>First child</li>
<li>Second</li>
<li id="selected">Third child</li>
<li>Fourth child</li>
</ul>
Using something like this:
$('#selected').childNumber();
That should return "3" for it's parent wrap, regarding the child number.