I have some tables that are generated with automatic id, so I didn’t know the table id before to do some stuff on it.
To retrieve my id, I use this jQuery light code
$('table').each(function(){
alert(this.id);
});
Idea of the html code generated:
<table id="table1">...</table><table id="table2">...</table>
This jQuery code give me all table ids.
My tables have some button to add rows, so if I click on the add button for the 2nd table, that only add the row for the 2nd table (the code upside give me all table id on my web page)
How can I retrieve the curent table id? (I have try to play with prev() but I think I don’t play as well as I must do)
Note: I didn’t need code to append a row, I could do that 😉
Are you asking for: