<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>拖拽</title>
<style>
.nav {
width: 200px;
height: 200px;
border: 1px solid black;
}
.title {
width: 100%;
height: 20px;
background-color: red;
cursor: pointer;
}
</style>
</head>
<body>
<div class="nav">
<div class="title">hello 主人 拖我试试看</div>
<div>
我是内容。。。。
</div>
</div>
<script src="../plugins/jquery/jquery-1.10.1.min.js"></script>
<script src="../plugins/jquery/jquery-ui.min.js"></script>
<script src="../plugins/jquery/jquery.ui.touch-punch.js"></script>
<script>
$(".nav").draggable({
handle: ".title"
});
</script>
</body>
</html>