JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<button id="go">» Run</button>
<div class="block"></div>
<script>
var url = "https://code.jquery.com/color/jquery.color.js";
$.getScript(url);
</script>
</body>
CSS
.block {
background-color: blue;
width: 150px;
height: 70px;
margin: 10px;
}
JavaScript
$("#go").click(function () {
$(".block")
.animate({
backgroundColor: "rgb(255, 180, 180)"
}, 1000)
.delay(500)
.animate({
backgroundColor: "olive"
}, 1000)
.delay(500)
.animate({
backgroundColor: "#00f"
}, 1000);
});