I looked through the list of suggested posts and didn't see an answer.
I am trying to capture the index of the current row using .on('click') method:
$('.addExpTableClass tbody').on('click', function() { console.log($(this).find('td:first').text()); });
The results are only showing "Row1x", which is the text from the hidden first column:
The problem is that as I add rows, the value remains "Row 1x" as shown above.
I can't seem to clear the value from the time the function initially runs. Every time I click the count increases, but the value remains the same in the console. What am I missing here?
Thank you in advance