JSFiddle - React, Tailwind, and code Playground

by shriek

HTML

<div class="row"> <a href="#" id="wow" class="buffer" onClick="popup(event)">Test</a>
    <section class="mini-cart">More work</section>
</div>
<div class="row"> <a href="#" class="buffer" onClick="popup(event)">Test</a>
    <section class="mini-cart">More work</section>
</div>
<div class="row"> <a href="#" class="buffer" onClick="popup(event)">Test</a>
    <section class="mini-cart">More work</section>
</div>
<div class="row"> <a href="#" class="buffer" onClick="popup(event)">Test</a>
    <section class="mini-cart">More work</section>
</div>

CSS

.mini-cart {
    display:none;
}

JavaScript

function popup(event) {
    event.stopPropagation();
    $(".mini-cart").hide();
    $(event.currentTarget).siblings(".mini-cart").show();
}