I am trying to connect a dragged jQueryUI element to a sortable element, where the helper is always added to the body. When I drag and drop a dragged item onto a sortable item, the helper gets into the sorted item. Although sortable items are added to the body element when dragging and dropping.
$(".a").sortable({
appendTo: document.body,
connectWith: ".a",
helper: "clone"
}).disableSelection();
$("section div").draggable({
connectToSortable: ".a",
helper: "clone",
revert: "invalid",
appendTo: document.body
}).parent().disableSelection();
To demonstrate my problem, I made this script: http://jsfiddle.net/fnmfndby/
As you can see when dragging a sortable item, the helper is green. When you drag and drop a dragged item, it is also green, but when you drag it over the sorted item, it turns red.
Regards, Relations