I have an html table
which is generated dynmically from an ajax call. It can have a variable number of rows and will always have 7 columns.
What I want to know is how to get a td
's indexes in the table with JavaScript/JQuery. I'm mostly interested in the column number but the row number would be a bonus.
I have the following handler:
$("#my-table").on("click", "td" ,function () {
var my_row = $(this).parent();
});