I have a page with multiple div, and I’d like to add an incrementing number inside each div.
I thought this would do the job but it isn’t:
$(document).ready(function(){
var i;
while ( i<count) {
$('#div').append(i);
i++;
}
});
I added this script after </body>
Here’s one way to do it:
DEMO