html - How to set table cell value using jquery jquery - Chaaanging table cell contents
jQuery set value on specific table cell
var col_index = $(this).index('tr:eq('+row_index+') td');
var col_index = $(this).prevAll().length;
var row_index = $(this).parent('tr').prevAll().length;
var col_index = $(this).closest("td").index();
var row_index = $(this).closest("tr").index();
$('table#table_header tr:nth-child(' + row_index + ') td:nth-child(' + col_index + ')').html('bla bla bla');
Hiç yorum yok:
Yorum Gönder