On a particular item, how can I know what the current child count is?
for example:
<div id="parent">
<img id="lorem" />
<img id="ipsum" />
<img id="dolor" />
<img id="sit" />
<img id="amet" />
</div>
how can I know $('#sit') is # 4 of its siblings ? I could iterate over all children and count but this seams very slow especially because I need to update it quite often and because there are hundreds of siblings and I only need to target the last 5 siblings
A workaround to my solution would be to be able to target the last 5 children's independently. Any idea how?