This is a migrated thread and some comments may be shown as answers.

Really Drag and Drop function

1 Answer 63 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 20 Aug 2012, 10:21 AM
Hello,

I would like to ask for help with my D&D function...

Here is a Fiddle: http://jsfiddle.net/B5kJf/5/

Function D&D is implemented but I can't fix bug when you drop object to his original target. If you do it, object will split in two.

Please help me.
-David

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 20 Aug 2012, 12:22 PM
I found issue in this example: http://jsfiddle.net/RichardAD/K27fu/

Only one thing what was needed is change this line:
this.element.html(this.element.html() + e.draggable.element[0].outerHTML);
By this:
this.element.append(e.draggable.currentTarget)

Best regards,
-David
Tags
Drag and Drop
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or