JSFiddle - React, Tailwind, and code Playground
HTML
<a id='myId' href="#"> Hide stuff </a><div id="thisOne">hide me</div><div id="notThis">Don't hide me</div>
JavaScript
function doSome() {
$.each(arguments, function() {
this.hide();
});
}
$(function() {
$("#myId").click(function(event) {
doSome($(this), $("#thisOne"));
event.preventDefault();
});
});