开发者

dragging multiple list items simultaneously

开发者 https://www.devze.com 2023-01-05 00:28 出处:网络
I have two lists connected with jQuery UI\'s sortable, allowing to drag items from one list to another.

I have two lists connected with jQuery UI's sortable, allowing to drag items from one list to another.

http://jsbin.com/uraga3

Is there a simple way to drag several items at the same time - e开发者_StackOverflow中文版.g. to move items #3, #4 and #7 from left to right?


Not in the plugin.

You can write some custom code to add items to a selection and then move multiple at once.

Like:

$( "li" ).bind( "click", function() {
  $(this).toggleClass('sorting-selected');
});

$( "ul" ).bind( "sortreceive", function(event, ui) {
  $('li.sorting-selected').appendTo($(this));
});
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号