JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    <a href="#" class="switcher">link 1</a>
    <div class="popup">popup 1</div>
</div>
<div>
    <a href="#" class="switcher">link 2</a>
    <div class="popup">popup 2</div>
</div>
<div>
    <a href="#" class="switcher">link 3</a>
    <div class="popup">popup 3</div>
</div>

CSS

.popup {
    width:100px;
    height:100px;
    border:solid 1px #ccc;
    display:none;
}
.show {
    display:block
}
.active {
    color:red;
}

JavaScript

$('a.switcher').on('click', function() {
    var switcher = $(this);
    $(switcher).siblings('div.popup').toggleClass('show');   
    $(switcher).toggleClass('active');    
});