JSFiddle - React, Tailwind, and code Playground
by InviS
HTML
<button>click me</button>
<div id='animated'></div>
CSS
#animated{
width: 50px;
height: 50px;
background-color: red;
}
button{
margin-bottom: 50px;
}
JavaScript
$('button').bind('click', start);
var $element = $('#animated');
var animationName = 'animate';
var start = function(){
$element.dequeue(animationName);
}
$el.queue(animationName, function(){
$(this).css({
width: +=15
});
});