In addition to the other answers, I'd like to improve the removal, to something more generic:
$(this).closest('tr').remove();
This would be much better than using $(this).parent().parent().remove();
, because it doesn't depend on the depth of the element. So, the structure of the row becomes much more flexible.