I would like to list all divs with spans of id="position" to simulate a rating.
Ex:
<div id="conteudo">
<div id="time"><span id="posicao">1.</span> Nome1</div>
<div id="time"><span id="posicao">2.</span> Nome2</div>
<div id="time"><span id="posicao">3.</span> Nome3</div>
<div id="time"><span id="posicao">N.</span> NomeN</div>
</div>
I tried to generate it this way:
var divs = $("#conteudo").find("#posicao").toArray();
$.each(divs, function (index, value) {
$("#posicao").append((index+1)+".");
});
But the numberings were only generated in the first span of id="position".