JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/base/jquery-ui.css" type="text/css" media="all" /> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js" type="text/javascript"></script>

<style>
#container { width: 300px; height: 300px; border:1px solid red;}
#divId{width:100px; height:100px; background:red;}
</style>



<div id="container">
</div>
<button>div</button>
    <script>
$("button").click(function() {
      var elm = $('<div id="divId" class="adiv abs"></div>');
      elm.appendTo('#container').resizable({
            containment: "#container"
      }).draggable({
            containment: "#container"
      });
});

</script>