JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/javascript">
alert($('td[id="4"]').parents().eq(0).attr("id"));
</script>
<table id="Table1" >
<tr id="tr1">
<td id="3" class="cell" >
first cell
</td>
<td id="4" class="cell">
second cell
</td>
</tr>
</table><script type="text/javascript">
alert($('td[id="4"]').parents().eq(0).attr("id"));
</script>