JSFiddle - React, Tailwind, and code Playground

by TJ VanToll

HTML

<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<link href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>

<div id="spacer1"></div>
<div id="spacer2"></div>   
<div id="container">
    <div id="resizable"></div>
</div>

CSS

#spacer1 { 
    width: 100px;
    height: 100px;
    background-color: green;
}
#spacer2 {
    width: 100px;
    height: 300px;
    float: left;
    background-color: yellow;
}
#container {
    float: left;
    background-color: blue;
    width: 300px;
    height: 300px;
}
#resizable {
    background-color: red;
    position: absolute;
    top: 200px;
    left: 200px;
    width: 100px;
    height: 100px;
}

JavaScript

$("#resizable").resizable({
    containment: '#container',
    handles: 'all'
});