JSFiddle - React, Tailwind, and code Playground
HTML
<button id="click">ClickME</button>
<table style="width:20%; height:30%">
<tr>
<td>
<div id="divContainer">
</div>
</td>
</tr>
</table>
CSS
#divContainer{
width:100%;
height:40%;
overflow:auto;
border:1px solid;
display:inline-block;
}
#click{
width:100px;
height:30px;
}
table{
border:1px solid;
}
body{
height:1000px;
}
JavaScript
$(function () {
$("#click").on("click", function () {
$("#divContainer").append($("#click").clone());
});
});