jQuery sortable obtain 2 elements being swapped

后端 未结 5 1816
温柔的废话
温柔的废话 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 17:01

    take a look at the "Swapable" jQuery plugin:

    http://plugins.jquery.com/project/Swapable

    It similar to "Sortable", but only two elements of the selected group are affected: dragged element and dropped one which are swapped. All other elements stay at their current positions. This plugin is built based on existing "Sortable" jQuery plugin and inherits all sortable options.

提交回复
热议问题