JSFiddle - React, Tailwind, and code Playground
HTML
<div id="bounce"></div>
CSS
#bounce {
height:50px;
width:50px;
background:#333;
margin-top:50px;
position:relative;
}
JavaScript
$( "#bounce" ).click(function() {
for (var i=1; i<=3; i++) {
$(this).animate({top: 30},"slow");
$(this).animate({top: 0},"slow");
}
});