JQuery user interface: sortable and drag & drop + sortable and drop

I have two lists. They are sorted, but not connected (the elements of the "one" list cannot be mixed with the elements of the "two" list)

I want the elements of the list one to be unavailable, and the elements of the list two to be draggable, because I want to drag the element of the list two to the list one.

How do i do

EDIT:

I tried to make the question as general as possible, but maybe I should be more clear ... sorry. The items in list 1 are "categories" and they must be sortable. List two items are "links" and must be sortable. A link refers to only one category. I want to move a link from a category to another, and I would like to use jQuery Ui.

+1
source share
1 answer

If I understand your question correctly, you do not need to use draggableand droppablein conjunction with sortablein your case.

, , :

<ul id="first">
    <!-- ... -->
</ul>

<ul id="second">
    <!-- ... -->
</ul>

$("#first").sortable();
$("#second").sortable({
    connectWith: "#first"
});
0

All Articles