Latest web development tutorials
×

jQuery EasyUI Tutorial

jQuery EasyUI Tutorial jQuery EasyUI Introduction

jEasyUI application

jEasyUI Create a CRUD application jEasyUI Create a CRUD data grid jEasyUI Form CRUD application jEasyUI Create an RSS reader

jEasyUI Drag and drop

jEasyUI Basic drag and drop jEasyUI Create a drag-and-drop shopping cart jEasyUI Create a school curriculum

jEasyUI Menus and buttons

jEasyUI Create a simple menu jEasyUI Create a link button jEasyUI Create a menu button jEasyUI Create a split button

jEasyUI layout

jEasyUI Create a border layout jEasyUI Create a complex layout jEasyUI Creates a fold panel jEasyUI Create a tab page jEasyUI Dynamically add a tab jEasyUI Add the AutoPlay tab jEasyUI Create the XP style left panel

jEasyUI Data grid

jEasyUI Convert HTML tables to data grids jEasyUI Get the selected row data jEasyUI Add the query function jEasyUI Add a toolbar jEasyUI Create complex toolbars jEasyUI Sets the frozen column jEasyUI Dynamically change columns jEasyUI Format the column jEasyUI Set sort jEasyUI Custom sorting jEasyUI Create a column combination jEasyUI Add a check box jEasyUI Custom tab jEasyUI Enable in-line editing jEasyUI Extension editor jEasyUI Column operation jEasyUI Merge Cells jEasyUI Create a custom view jEasyUI Create a footer summary jEasyUI Condition Sets the line background color jEasyUI Create an attribute grid jEasyUI The extended line shows the details jEasyUI Create a subgrid jEasyUI Display massive data jEasyUI Add a paging component

jEasyUI window

jEasyUI Create a simple window jEasyUI Customize the Window Toolbar jEasyUI Window and layout jEasyUI Create a dialog box jEasyUI Customize the dialog box

jEasyUI Tree menu

jEasyUI Use the markup to create a tree menu jEasyUI Create an asynchronous tree menu jEasyUI Tree menu to add nodes jEasyUI Create a tree menu with check boxes jEasyUI Tree menu drag and drop control jEasyUI The Tree menu loads the parent / child nodes jEasyUI Create the base tree grid jEasyUI Create a complex tree grid jEasyUI Dynamic loading of tree jEasyUI The tree grid adds pagination jEasyUI Tree-lazy lazy-loading node

jEasyUI Form

jEasyUI Create an asynchronous submission form jEasyUI Form validation jEasyUI Create a tree drop-down box jEasyUI Format the drop-down box jEasyUI Filter down the data grid

jEasyUI Reference Manual

jQuery EasyUI Plugin jQuery EasyUI Extended

jQuery EasyUI based plug - Draggable draggable

jQuery EasyUI plugin jQuery EasyUI plugin

By $ .fn.draggable.defaults override the default defaults.

usage

By marking creates a draggable (draggable) elements.

<Div id = "dd" class = "easyui-draggable" data-options = "handle: '# title'" style = "width: 100px; height: 100px;">
    <Div id = "title" style = "background: #ccc;"> title </ div>
</ Div>

Use javascript creates a draggable (draggable) elements.

<Div id = "dd" style = "width: 100px; height: 100px;">
    <Div id = "title" style = "background: #ccc;"> title </ div>
</ Div>
$ ( '# Dd'). Draggable ({
    handle: '# title'
});

Attributes

名称 类型 描述 默认值
proxy string,function 拖动时要使用的代理元素,设置为 'clone' 时,克隆元素将被用作代理。如果指定一个函数,它必须返回一个 jQuery 对象。
下面的实例演示了如何创建简单的代理对象。
$('.dragitem').draggable({
	proxy: function(source){
		var p = $('<div style="border:1px solid #ccc;width:80px"></div>');
		p.html($(source).html()).appendTo('body');
		return p;
	}
});
null
revert boolean 如果设置为 true,拖动结束后元素将返回它的开始位置。 false
cursor string 拖动时的 css 光标(cursor)。 move
deltaX number 拖动的元素相对于当前光标的 X 轴位置。 null
deltaY number 拖动的元素相对于当前光标的 Y 轴位置。 null
handle selector 启动可拖动(draggable)的处理(handle)。 null
disabled boolean 如果设置为 true,则停止可拖动(draggable)。 false
edge number 能够在其中开始可拖动(draggable)的拖动宽度。 0
axis string 定义拖动元素可在其上移动的轴,可用的值是 'v' 或 'h',当设为 null,将会沿着 'v' 和 'h' 的方向移动。 null

event

名称 参数 描述
onBeforeDrag e 拖动前触发,返回 false 就取消拖动。
onStartDrag e 目标对象开始拖动时触发。
onDrag e 拖动期间触发。返回 false 将不进行实际的拖动。
onStopDrag e 拖动停止时触发。

method

名称 参数 描述
options none 返回选项(options)属性(property)。
proxy none 如果设置了代理(proxy)属性就返回拖动代理(proxy)。
enable none 启用拖动动作。
disable none 禁用拖动动作。

jQuery EasyUI plugin jQuery EasyUI plugin