Sortable UI - Sorting lists between 3 containers
Hi folks..
I have 3 lists set side by side. Ex:
- <ul id="list1" class="listSort">
- <li id="id1">Data1</li>
- <li id="id2">Data 2</li>
- <li id="id3">Data 3</li>
- </ul>
- <ul id="list2" class="listSort connectSort">
- <li id="id4">Data1</li>
- <li id="id5">Data 2</li>
- <li id="id6">Data 3</li>
- </ul>
- <ul id="list3" class="connectSort">
- <li id="id7">Data1</li>
- <li id="id8">Data 2</li>
- <li id="id9">Data 3</li>
- </ul>
This an example of initializing them in jQuery...
- $("#list1").sortable({
- connectWith: '.listSort'
- }).disableSelection();
- $("#list2").sortable({
- connectWith: '.connectSort'
- }).disableSelection();
Unfortunately, the functionality I need isn't working out. What I need is:
1. List A must interact with List B;
2. List B must interact with List C
3. Items not needed in List B can be transferred back to List A only.
Furthermore, List C must be restricted to only 1 entry, i.e only one item is transferable from List B to C.
I'm new to jQuery and as a result I can't seem to find a solution to this problem. If someone knows how to work this out, I'd be grateful if you can assist me.
Best Regards,
Sabier