JSFiddle - React, Tailwind, and code Playground
by bosworth99
HTML
<div id="wrapper">
<div id="slides"></div>
</div>
CSS
div#slides{
cursor:pointer;
background-color:red;
height:100px;
width:100px;
position:relative;
}
div#slideInner{
border: 5px black solid;
height:100px;
width:100px;
}
JavaScript
setTimeout( function(){ wrap() }, 2500 );
function wrap() {
var newDiv = document.createElement('div');
newDiv.setAttribute("id", "slideInner");
document.getElementById('wrapper').appendChild(newDiv);
newDiv.appendChild(document.getElementById('slides'));
}