JSFiddle - React, Tailwind, and code Playground

HTML

<table>
<tr>
<td width=60 class="totalactive"><b>Is active</b> :</td>
    <td width=50><img class="img_active" src="http://mascot.crystalxp.net/png/th_2899-froggy-the-frog.jpg" /></td>
</tr>
</table>

JavaScript

$(".img_active").click(function() {
var xxx = $(this).parent('td').prev("td.totalactive").text();
alert(xxx);
});