Test Case Boilerplate
Fork this way...
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="bar"></div>
CSS
html, body
{
margin: 0;
padding: 0;
height: 100%;
}
#bar {
background: rgba(0,0,0,0.5);
height: 35px;
cursor: pointer;
width: 200px;
margin: 10px;
border: 10px solid rgba(0,0,0,0.5);
}
JavaScript
$('#bar').draggable({
containment: 'document',
scroll: false
});