JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test"></div>

CSS

#test
{
  background: red;
  width: 150px;
  height:0px;
}

JavaScript

var i = 0;
var test = $('#test');

test.css({transition: 'height 1s linear', height: '100px'});

setTimeout(function(){
  test.css({transition: 'none', height: '0px'});
  test[0].offsetWidth;
  test.css({transition: 'height 1s linear', height: '100px'});
  
},2000);


test.on('transitionend webkitTransitionEnd', function(){
	test.text(++i);
});