JSFiddle - React, Tailwind, and code Playground
HTML
<div id="example">
<div id="content"> content </div>
</div>
CSS
#example {
width: 100px;
height: 100px;
position: absolute;
bottom: 0;
border:2px solid black;
}
#example:hover { cursor: pointer; }
#content{
}
JavaScript
$(function () {
$('#example').click(function () {
$("#content").animate(top: "20px"}, 750);
})
})