[jquery] Finding the id of a parent div using Jquery

This can be easily done by doing:

$(this).closest('table').attr('id');

You attach this to any object inside a table and it will return you the id of that table.