JSFiddle - React, Tailwind, and code Playground
HTML
<div id="apple" style="">
</div>
CSS
.icon-spinner {
height: 50px;
width: 50px;
background: green;
z-index: 999;
margin: auto;
}
#apple {
background: gold;
height: 100px;
width: 100px;
}
JavaScript
var div = $(document.createElement('div'));
div.addClass('icon-spinner');
div.hide();
$('#apple').append(div);
div.show('slow');