JSFiddle - React, Tailwind, and code Playground
HTML
<table class="row-hoverable">
<tr>
<td>
t1-1
</td>
<td>
t1-2
</td>
<td>
t1-3
</td>
</tr>
<tr>
<td>
t2-1
</td>
<td>
t2-2
</td>
<td>
t2-3
</td>
</tr>
<tr>
<td>
t3-1
</td>
<td>
t3-2
</td>
<td>
t3-3
</td>
</tr>
</table>
JavaScript
$(function() {
$('.row-hoverable td').hover(
function() {
$(this).parent().children().css('background-color', 'red');
},
function() {
$(this).parent().children().css('background-color', 'blue');
}
);
});