Reputation: 83
I have a few table-blocks, and whole table with workout cells . When dragging I use helper to clone .table-block and later I append it to .workout-cell on drop. When dropped to .workout cell I can't move it anymore. I want to make it draggable again within the table, and be able to move it. How to do this?
Here is code:
$( ".table-block" ).draggable({
helper : "clone",
});
$(".workout-cell").droppable({
drop: function(ev, ui) {
var element=$(ui.draggable).clone();
$(this).append(element);
}
});
Upvotes: 1
Views: 1454
Reputation: 239501
You need to call .draggable
on the cloned element:
$(".workout-cell").droppable({
drop: function(ev, ui) {
var element=$(ui.draggable).clone();
$(this).append(element);
$(element).draggable({helper: 'clone'});
}
});
Upvotes: 2