JSFiddle - React, Tailwind, and code Playground

by benPearce

HTML

<body>
    <div style="display:block;border:2px solid black" class="big" id="test">hi</div>
    </body>

CSS

@keyframes myfirst
{
from {background:red;}
to {background:yellow;}
}

@-webkit-keyframes myfirst /* Safari and Chrome */
{
from {height:200px;}
to {height:100px;}
}

.big
{
height:200px;
}

.small
{
animation:myfirst 5s;
-webkit-animation:myfirst 5s; /* Safari and Chrome */
}
}

JavaScript

$("#test").click(function(){
     $("#test").toggleClass("small");
});