JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#">Hide both</a>
<div id="foo">
    Additional content to hide
</div>

JavaScript

$('a').click(function(){
    $('#foo').add(this).hide();
});