I think it should be simple, but I could not understand:
I have a container with a couple of children:
<div id='container'>
<div id='one'>some</div>
<div id='two'>random</div>
<div id='three'>text</div>
</div>
I want to know the position of the word element ('# two') ... which should return 2 (since this element is the second of the children of the container, $ ('# one') ... should return 1, etc.
Thank you very much in advance,
Martin
source
share