find parent td after selctiing another td code example Example: get main tr from td jquery tdToPad.closest('tr') .addClass('X-' + pad)