JSFiddle - React, Tailwind, and code Playground
by Karan1412
HTML
<html>
<head>
<title>stop</title>
</head>
<body>
<div id="myDiv"></div><br/>
<input type="button" id="start" Value="Start"/>
<input type="button" id="stop" Value="Stop"/>
<input type="button" id="reset" Value="Reset"/>
</body>
</html>
CSS
#myDiv
{
height:100px;
width:100px;
background-color:orange;
}
JavaScript
$(document).ready(function () {
$("#start").click(function () {
$("#myDiv").animate({ width: "500px" }, 5000);
});
$("#stop").click(function () {
$("#myDiv").stop();
});
$("#reset").click(function () {
$("#myDiv").animate({ width: "100px" }, 500);
});
});