html 页面header 添加:
<script src="js/jquery.min.js" language="javascript"></script>
<script src="js/jquery.easydrag.handler.beta2.js" ></script>
<script>
$(document).ready( function()
{
$("#divPanel").easydrag();
}
);
</script>
html body 添加拖动div内容:
<div id="divPanel" style="width:300px;height:300px;background:white;border:1px solid #000000;position:absolute;left:5px;top:50px" >
<div id="divTitle" style="width:100%;height:25px;background:lavender">
Title
</div>
<div style="width:100%">
Jquery Drag 效果
</div>
</div>
演示下载地址:JQuery Drag 简单代码拖动实现.rar