Test Case Boilerplate

Fork this way...

by TJ VanToll

HTML

<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/jquery-ui-git.css">
<div id="parent">
    <div id="draggable"></div>
</div>

CSS

#parent {
    height: 500px;
    width: 500px;
    background: green;
}
#draggable {
    background: red;
    height: 50px;
    width: 50px;
    margin: 50px;
}

JavaScript

$( "#draggable" ).draggable({
    containment: "#parent"
});