JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tr><td class="this-is-a-label">Label Cell</td></tr>
<tr><td>Detail 1</td></tr>
<tr><td class="selected">Detail 2</td></tr>
</table>
JavaScript
$.fn.cellFromCell = function(r,c,upOrDown) {
if(upOrDown == 'up') {
return $(this).parent().nextAll('tr:eq(' + r + ')').find('td:eq(' + c + ')').text();
} else {
return $(this).parent().prevAll('tr:eq(' + r + ')').find('td:eq(' + c + ')').text();
}
}
alert($('.selected').cellFromCell(1, 0)); // alerts "Label Cell"
alert($('.this-is-a-label').cellFromCell(0, 0, 'up')); // alerts "Detail 1"