views:

89

answers:

2

I'm building a widget which allows user to copy items from one list over to another, but dragging.

I've figured out the helper: 'clone' option will allow me to drag a copy of my draggable, rather than the draggable itself. I'd like to have the clone animate/snap in to place when I drop it on my droppable, but it seems to be destroyed as soon as I release it. How can I prevent its destruction so I can animate it myself when it's released?

I realize Sortable might give me some of the functionality I want, but then my lists will become sortable, which I don't want. I just want simple copy -> release - > snap functionality.

A: 

I answered a similar question on Doctype which included this demo. It uses draggable and droppable though, and not sortable as you described in your question. I wasn't sure which one you are using, but the method to animate the clone is similar.

fudgey
A: 

On the callback function for drop, do something like:

draggedElement.clone().appendTo(dropDestination);

Let me know if that's not sufficient.

Mark
Perfect! Thanks.
morgancodes