JSFiddle - React, Tailwind, and code Playground
HTML
<button>Click here to animate text</button>
<p>We can give any information here about the animate effect.</p>
<div> This div get animate</div>
CSS
div{
background-color:#7D7D7D;
height:100px;
width:100px;
color:#fff;
}
JavaScript
$(document).ready(function(){
$("button").click(function(){
var p = $("div");
p.animate({height: '400px', opacity: '0.6'}, "fast");
p.animate({width: '400px', opacity: '0.9'}, "fast");
p.animate({height: '200px', opacity: '0.6'}, "fast");
p.animate({width: '200px', opacity: '0.9'}, "slow");
});
});