JSFiddle - React, Tailwind, and code Playground
by TJ VanToll
HTML
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<div id="grandparent">
<div id="parent">
<div id="child">
</div>
</div>
</div>
CSS
#grandparent {
width: 500px;
height: 500px;
background: green;
}
#parent {
width: 300px;
height: 300px;
background: red;
}
#child {
height: 100px;
width: 100px;
background: blue;
}
JavaScript
$( "#child" ).resizable({
containment: "#grandparent"
});