<html lang="en">
<head>
<title></title>
<link type="text/css" href="js/themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/ui/ui.core.js"></script>
<script type="text/javascript" src="js/ui/ui.draggable.js"></script>
<link type="text/css" href="js/demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
var dragOpts = {
helper: "clone",
stop: getNewPos
};
function getNewPos(e, ui) {
e.stopPropagation();
alert(ui.position.top + "px from the top, " + ui.position.left + "px to the left of the original object.");
alert(ui.absolutePosition.top + "px from the top, and " + ui.absolutePosition.left + "px to the left relative to the page.");
}
$("#drag").draggable(dragOpts);
});
</script>
</head>
<body>
<div id="container">
<div id="drag">asdf</div>
</div>
</body>
</html>