Instead of using parent('tr'), please try and use .closest('tr') in the future. This will navigate through the parents to find the first closest 'tr' element.
Because sometimes it's not a direct parent (I had such case where in IE there was a workaround-wrapper)