How do I connect multiple sortable lists to each other in jQuery UI?

后端 未结 3 2048
情话喂你
情话喂你 2021-02-01 15:05

I\'m new to jQuery, and I\'m totally struggling with using jQuery UI\'s sortable.

I\'m trying to put together a page to facilitate grouping and ordering of

相关标签:
3条回答
  • 2021-02-01 15:43

    Can you include the syntax you used for connectWith? Did you place the list of other groups inside brackets(even if it's a selector)? That is:

    ...sortable({connectWith:['.group'], ... }
    
    0 讨论(0)
  • 2021-02-01 15:43

    This should work:

    $('#groupsList').sortable();
    $('.itemsList').sortable({
        connectWith: $('.itemsList')
    });
    
    0 讨论(0)
  • 2021-02-01 15:56
     $(function() {
                $( "#groupItems1, #groupItems2, #groupItems3" ).sortable({
                    connectWith: ".itemsList"
                }).disableSelection();
            });
    

    This will go all fine for you! doing the same here for me. NO change required in your HTML.

    0 讨论(0)
提交回复
热议问题