AnC
AnC

Reputation: 4201

dragging multiple list items simultaneously

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.g. to move items #3, #4 and #7 from left to right?

Upvotes: 1

Views: 2129

Answers (1)

Mark
Mark

Reputation: 33571

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));
});

Upvotes: 1

Related Questions