0
вот мой fiddleКак выбрать все заголовки столбцов из таблицы
это где я нахожусь:
$('#mytable thead tr').each(function(index) {
//console.log($(this).html())
console.log(index)
});
вот мой fiddleКак выбрать все заголовки столбцов из таблицы
это где я нахожусь:
$('#mytable thead tr').each(function(index) {
//console.log($(this).html())
console.log(index)
});
$(this).html()
получает все заголовки столбцов.
вот fiddle
$('#mytable thead tr th').each(function(index) {
console.log($(this).html())
console.log(index)
});
Headers
хранятся в th
, так что вы должны пойти один уровень глубже.
$('#mytable thead tr th').each(function(index) {
console.log($(this).html())
});