I found that Keith’s method worked for me. Since his answer doesn’t include an example implementation, I’ll post mine:
$('.dropTarget').droppable({
drop: function(ev, ui) {
var dropped = ui.draggable;
var droppedOn = $(this);
$(dropped).detach().css({top: 0,left: 0}).appendTo(droppedOn);
}
});
or, slightly more concisely:
$('.dropTarget').droppable({
drop: function(ev, ui) {
$(ui.draggable).detach().css({top: 0,left: 0}).appendTo(this);
}
});