JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <tbody>
        <tr>
            <td><a href="#">text</a></td>
            <td>text</td>
        </tr>
    </tbody>
</table>

JavaScript

$('table tbody tr').each(function() {
    var $this = $(this);
    $this.find('a:first').click(function() {
        $this.css('background', 'red');
    });
});