JSFiddle - React, Tailwind, and code Playground
by flashspys
HTML
<script src="http://code.jquery.com/jquery-2.1.1.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.0/themes/ui-lightness/jquery-ui.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<div id="postcard">
<div class="textdiv">
</div>
</div
CSS
#postcard {
width: 150px;
height: 150px;
border: 1px #000000 solid;
margin: 0 auto;
}
.textdiv {
width: 40px;
height: 40px;
position: absolute;
background-color: transparent;
border: 2px #000000 solid;
padding: 10px;
box-sizing: content-box;
}
JavaScript
$(document).ready(function () {
$(".textdiv").draggable({
containment: "parent"
}).resizable({
handles: "all",
containment: "parent"
});
});