jQuery EasyUI Drag and Drop - Basic Dragging and Dropping
This tutorial shows you how to make HTML elements draggable. In this example, we will create three DIV elements and then enable dragging and dropping on them.
First, we create three
element:
For the first
element, we make it draggable using the default settings.
$('#dd1').draggable();
For the second
element, we make it draggable by creating a proxy that is a clone of the original element.
$('#dd2').draggable({
proxy:'clone'
});
For the third
element, we make it draggable by creating a custom proxy.
$('#dd3').draggable({
proxy:function(source){
var p = $('proxy');
p.appendTo('body');
return p;
}
});