jQuery sortable obtain 2 elements being swapped

后端 未结 5 1804
温柔的废话
温柔的废话 2020-12-04 16:18

I cannot find out how to obtain destination element with jQuery UI sortable.

    $(\"#pages\").sortable({
        opacity: 0.6,
        update: function(even         


        
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 16:39

    There's not really a "second" item per se. You have an item, and you are simply placing it in another location. The items around it adjust their positions accordingly. If you want to get an array of all the items, you can use the toArray method.

提交回复
热议问题