jQuery EasyUI drop - basic drag and drop

This tutorial shows you how to make an HTML element draggable, in this case, we will create three DIV elements and enable them to drag and drop.

First, we create three <div> element:

	<Div id = "dd1" class = "dd-demo"> </ div>
	<Div id = "dd2" class = "dd-demo"> </ div>
	<Div id = "dd3" class = "dd-demo"> </ div>

For the first <div> element, we can let drag by default.

	$ ( '# Dd1') draggable ().;

For the second <div> element, we create a clone (clone) of the original elements of the agent (proxy) can be allowed to drag.

	$ ( '# Dd2'). Draggable ({
		proxy: 'clone'
	});

For the third <div> element, we create a custom proxy (proxy) can be allowed to drag.

	$ ( '# Dd3'). Draggable ({
		proxy: function (source) {
			var p = $ ( '<div class = "proxy"> proxy </ div>');
			p.appendTo ( 'body');
			return p;
		}
	});

Download jQuery EasyUI examples

jeasyui-dd-basic.zip