It is best to use closest for this:
$(document).on('click', '.XAxisrowCheckbox', function () { $(this).closest('td').css('background-color','red'); });
It reads much better than parent and next , and if you need to, you could also bind the find statement. For instance:
$(this).closest('td').find('a').css('color','red');
This essentially says: "Make your way to the tree until you find the first td wrapping element with a click, and then lower it again until you find all a elements
EDIT: Actual code that works after a workaround for me
$(this).closest('td').next().css('background-color','red');
source share