For some reason every time I try to count the number of rows in a table it always returns 1. I am dynamically adding and removing rows to the table, so I'm starting to think it is just counting the number of rows initially configured in the table. here is the code I'm using.
$(".elementDelRowButton").live ('click', function (event) {
console.log ($(this).closest('table').length);
if ($(this).closest('tr').index()!=0) {
$(this).parent().parent().remove();
}
});
I have tried using Size, length and other variations, it always returns 1.
here is the HTML
+/-Thank you everyone.