JSFiddle - React, Tailwind, and code Playground

HTML

<div id="accordion">
<h3><a href="#">The Title - Item 1</a></h3>
<div>
The Content - Item 1
    <input type="button" id="myClicker" value="delete" />
</div>
<h3><a href="#">The Title - Item 2</a></h3>
<div>
The Content - Item 2
</div>
</div>

JavaScript

$('#myClicker').click(function() {
    var parent = $(this).closest('div');
    var head = parent.prev('h3');
    parent.add(head).fadeOut('slow',function(){$(this).remove();});
});