JSFiddle - React, Tailwind, and code Playground
HTML
<div id="tc-2">111
<div>222
<div>3333</div>
<div id="start" style="color: red;">Press me</div>
</div>
</div>
<div id="print"></div>
JavaScript
$('#start').click(function(){
p = $(this).parents("div[ @id = 'tc-' ]");
$("#print").html(p.attr('id'));
});