Answer the question
In order to leave comments, you need to log in
Select and drag multiple list items?
Good afternoon, the following task arose and the problem is It is
necessary to create a drag-n-drop list with the ability to select several positions and move them.
I used jquery ui sortable, but the maximum I achieved was that when selecting the elements are fastened, but only one element moves ((
Here is my
HTML code:
$(document).ready(function(){ <br/>
<br/>
$(function() {<br/>
<br/>
$("#test-list").sortable({<br/>
placeholder: 'ui-state-highlight',<br/>
<br/>
helper: function(){ <br/>
<br/>
var selected = $('#test-list input:checked').parents('li'); <br/>
if (selected.length === 0) { <br/>
selected = $(this); <br/>
} <br/>
var container = $('<div/>').attr('id', 'draggingContainer'); <br/>
container.append(selected.clone()); <br/>
return container; <br/>
}<br/>
});<br/>
$("#test-list").disableSelection();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question