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="drag"></div>
<div id="position"></div>
CSS
#drag {
background:red;
width: 100px;
height: 100px;
}
JavaScript
$(document).ready(function () {
$("#drag").draggable({
grid: [3.3, 0],
containment: [0,0,330,0],
drag: function() {
var left = $("#drag").position().left
console.log(left);
$("#position").html(left);
}
});
});