General:
How can I select the first matching ancestor of an element in jQuery?
Example:
Take this HTML block
That would be closest:
$(this).closest('tr').hide();