I need to show each number of div in the page in order
And add the value of each div inside span
so if I have 4 divs inside page like this
You can try this:
$("div").each(function(i, elem){ $(elem).append($(""+(i+1)+"")); });
JSFiddle example