this is pseudo code
var index_of_myid = $('.selection').indexOf($('#myid));
Not sure if this is correct, it is possible if you can understand what I'm trying to do
EDIT
<div>
<div class="selector"></div>
</div>
<div>
<div class="selector"></div>
</div>
<div>
<div class="selector" id="myid"></div>
</div>
<div>
<div class="selector" id="myid2"></div>
</div>
I just need to know which number selector is myid
source
share