JSFiddle - React, Tailwind, and code Playground

by doug65536

HTML

Click one to remove it

<div>A</div>
<div>B</div>
<div>C</div>
<div>D</div>
<div>E</div>

CSS

div {
    width: 45px;
    height: 45px;
    background-color: blue;
    color: white;
    text-align: center;
    padding-top: 8px;
}

JavaScript

$('div').on('click', function() {
    var item = $(this);
    item.slideUp(function() {
        item.remove();
    });
});