JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<td>
<a class="item1" href="#">
Menu1
</a>
</td>
<td>
<a class="item1" href="#">
Menu2
</a>
</td>
</table>
CSS
.item1{
color: black;
}
a{
text-decoration: none;
}
JavaScript
$('.item1').click(function(e){
$('.item1').css("color", "black");
$(this).css("color", "red");
});