JSFiddle - React, Tailwind, and code Playground
by Karan1412
HTML
<html>
<head>
<title>animate</title>
</head>
<body>
<div id="targetDiv"></div><br>
<input type="button" id="myButton" value="Animate">
<input type="button" id="reset" Value="Reset" onclick="location.reload()" />
</body>
</html>
CSS
#targetDiv
{
height:100px;
width:100px;
background-color:orange;
}
JavaScript
$(document).ready(function () {
$("#myButton").click(function () {
$("#targetDiv").animate({
opacity: 0.4,
marginLeft: "0.6in",
fontSize: "3em",
borderWidth: "10px"
}, 1500);
});
});