JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<p id="p2">some text</p>
<div id="div1">
<p id="p1">some text</p>
</div>
CSS
#div1{
position : absolute ;
top : 10px ;
left : 20px ;
background : black ;
width : 200px ;
height : 200px ;
cursor : move ;
overflow: hidden;
}
#p2{
position : absolute ;
top : 100px ;
left : 200px ;
color : blue ;
width: 200px;
}
#p1{
position : absolute ;
top : 90px ;
left : 180px ;
color : white ;
width: 200px;
}
JavaScript
$(document).ready(function(){
$("#div1").draggable();
});