Rameez Javed

Rameez Javed

  • NA
  • 395
  • 61.3k

Html Table RowIndex for Dynamic Rows

Jan 7 2020 10:54 PM
Hi, can anyone guide me regarding finding row index of html table using javascript jquery, what I'm doing is, I've created a empty row in var, on add row i just clone that empty row. Now I want to get some specific column value of a row (in which user is adding values), I want to get row index and then want to get specific column value by ClassName in that particular index. I've found the code for getting row index but the issue is it only works for the first row (0 index), not for any other...  Here is the code.
  1. $('#myTableId').find('tr').click(function () {  
  2.             alert('You clicked row ' + ($(this).index() + 1));  
  3.         });  

Answers (7)