public
Description: Interaction Service Plugin for chain.js
Home | Edit | New

Demo: Draggable with Droppable

Demos > Draggable with Droppable

First Last

Drop here!

Source

<div class="droppable" id="persons">
	<div class="item"><span class="first">First</span> <span class="last">Last</span></div>
</div>
<div id="drop">
	Drop here!
</div>
$('#persons')
	.items([
		{first:'Isaac', last:'Newton'},
		{first:'Johannes', last:'Keppler'},
		{first:'Alessandro', last:'Volta'},
		{first:'Blaise', last:'Pascal'}
	])
	.draggable()
	.chain();
$('#drop').droppable({
	accept: 'droppable',
	drop:function(droppable, item){
		var data = item.item();
		this.append('<br/>'+data.first+' '+data.last);
	}
});
Last edited by raid-ox, Tue Sep 16 09:13:47 -0700 2008
Home | Edit | New
Versions: