JSFiddle - React, Tailwind, and code Playground
HTML
<div class='spring'></div>
CSS
.spring {
background: red;
width: 100px;
height: 30px;
}
JavaScript
$(document).ready(function () {
$('.spring').hover(function () {
$('.spring').animate({
'backgroundColor': '#CCCCCC'
})
},
function () {
$('.spring').animate({
'backgroundColor': '#000000'
});
});
});