I can't understand how to increment a value of the table cells like: 1,2,3 etc?
My code:
$('#table').each(function(i){
$(this).find('td:nth-child(1)').text(i);
});
Please, look at the full example .
$('#table tr td:first-child').each(function(i){
$(this).text(i+1);
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.