I know how to get a cell's row and column index with jQuery, but I can't figure out the reverse. Given a row and column index, how would I access the td at this location?
With plain JavaScript:
// table is a reference to your table table.rows[rowIndex].cells[columnIndex]
Reference: HTMLTableElement, HTMLTableRowElement
HTMLTableElement
HTMLTableRowElement
With jQuery, you could use .eq():
.eq()
$('#table tr').eq(rowIndex).find('td').eq(columnIndex) // or $('#table tr:eq(' + rowIndex + ') td:eq(' + columnIndex + ')')
1.4m articles
1.4m replys
5 comments
57.0k users