JSFiddle - React, Tailwind, and code Playground
HTML
<div class="content">
<a href="#">A</a>
</div>
<div class="content">
<a href="#">B</a>
</div>
<div class="content">
<a href="#">C</a>
</div>
CSS
.content {
background-color:red;
margin:10px;
}
.content.other {
background-color:yellow;
}
JavaScript
$(".content a").click(function() {
var current = $(this).parent();
current.removeClass('other')
.siblings()
.addClass('other');
});