I managed to hack my way through this, but the solution is not pretty.

Anyway, if anybody has better approaches, I would still keenly like to
hear them.

jQuery does this pretty neatly out of box: 
http://jqueryui.com/demos/draggable/#sortable
However, I didn't get it running well with horizontal placement
(instead of vertical). Just a note if anybody might be struggling with
similar issues.

Tuukka



On 12 tammi, 12:31, Tuukka Mustonen <[email protected]> wrote:
> Hi,
>
> I am trying to make elements both droppable and sortable as demonstrated 
> inhttp://soletme.free.fr/dragdrop/index.htmlHowever, I am trying to use it
> with multiple targets. Seehttp://jsfiddle.net/Wx35D/8/
>
> The problem is, when I have multiple targets (green carts on the right), I
> cannot seem to end/reset the Sortables instance in a correct way. Instead,
> if you drag one of the "Items" into and out of the upper cart a few times
> and then continue the drag into the lower cart, onSort callback is called
> multiple times.
>
> Each time a target area is entered:
>
>             sort.addItems(sortClone);
>             sort.start(ev,sortClone);
>
> And each time a target area is left:
>
>             sort.end();
>             sort.removeItems(sortClone);
>
> However, that doesn't seem to make it. What else might it need? Pointers?
>
> Tuukka

Reply via email to