Search code examples
jqueryjquery-uidrag-and-dropjquery-ui-draggablejquery-ui-droppable

Issues with dragging and dropping jQuery UI draggable element from one list and put it into an other


I am using jQuery UI and can create an simple drag 'n drop list. But now, I want to drop the element into an other list. jQuery always thinks the item has been droppen on the false place and slides it back into the origin list.


Solution

  • I think the solution is found here: http://ui.jquery.com/demos/sortable/#connect-lists

    and its done something like this:

    $(function() {
            $("#sortable1, #sortable2").sortable({
                connectWith: ['.connectedSortable']
            });
        });