JSFiddle - React, Tailwind, and code Playground

HTML

<div></div>

CSS

div{
    height: 100px;
    width: 100px;
    background: gray;
}
.qwe {
    background: green;
}

JavaScript

$('div').click(function() {
    $(this).css({transition: '0s'}).addClass('qwe')
    .delay(1).queue(function() {
        $(this).css({transition: '2s'}).removeClass('qwe');
    });
});