<div id="box" class="easyui-draggable"></div>
$('#box').draggable();
$('#box').draggable({
revert : true,
cursor: 'text',
handle : '#pox',
disabled : false,
edge : 50,
axis :'v',
proxy : 'clone',
deltaX: 10,
deltaY : 10,
proxy: function(source){
console.log('呵呵哒!');
}
});
onBeforeDrag : function (e){
alert('拖动之前触发');
return false;
}
onStartDrag : function(e){
alert('拖动时触发');
}
onDrag : function(e){
alert('拖动过程触发');
}
onStopDrag : function (e){
alert('在拖动停止时触发');
}
console.log($('#box').draggable('options'));
console.log($('#box').draggable('proxy'));
$('#box').draggable('enable');
$('#box').draggable('disable');
<pre class="brush:java;">html>
<meta charset="UTF-8">
<title>Basic Draggable - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.6/themes/metro/easyui.css">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.6/themes/icon.css">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.6/demo/demo.css">
<script type="text/javascript" src="jquery-easyui-1.3.6/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.3.6/jquery.easyui.min.js"></script>
<h2>Basic Draggable</h2>
<p>Move the boxes below by clicking on it with mouse.</p>
<div id="dd" class="easyui-draggable" data-options="handle:'#title'" style="width:100px;height:100px;">
<div id="title" style="background:#ccc;width:100px;height:100px;">容器里面的内容</div>
</div>
<script>
$(function () {
$("#title").draggable({
proxy: function (a) {
var a = $('<div class="proxy_div">你拖我干啥</div>');
a.appendTo('body');
return a;
},
cursor: 'pointer',
edge: '6'
});
});
</script>
</pre><br><br>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有