<div class="collection">
<div class="item"></div>
<div class="item selected"></div>
<div class="item"></div>
<div class="item selected"></div>
<div class="item"></div>
<div class="item selected"></div>
<div class="item"></div>
</div>
How would I get the index of the divs with class "selected" to ignore the other siblings? in this case it should return 0 1 2, and not 1 3 5.