JSFiddle - React, Tailwind, and code Playground
HTML
<div id="content"></div>
<a id="add-element" href="#">add new element</a>
CSS
#content div {
background-color:transparent;
-moz-transition:background-color 2s;
-webkit-transition:background-color 2s;
-o-transition:background-color 2s;
transition:background-color 2s;
}
#content div.new {
background-color:yellow;
}
JavaScript
$('#add-element').click(function() {
var newElement = $('<div class="new">new element</div>');
$('#content').append(newElement);
newElement.focus();
newElement.removeClass('new');
});