7
J'ai 3 tables avec le même nom de classe table-sort
. Je voudrais accéder à ceux table en .each()
et compter le tr
intérieur du tbody
.
est-il $("this tbody tr").length
?
$('.table-sort').each(function(index) {
var rowCount = $("this tbody tr").length; //not work , Could you please correct this?
var rowCount1 = $(this).find('tbody > tr').length; //this is working fine
alert(rowCount + '-' + rowCount1);
})
Merci Gaby, sa réponse étonnante, rapide. – Jahangir
fonctionne génial !! –