1

I'm currently having a bit of an issue with my sortable JQuery list. I have multiple columns of "assignments" that the user is able to drag and drop to different dates. The drag and drop function seems off at times and does not allow me to drag and drop an item anywhere in a new column.

Currently - this is my JQuery Sortable function:

$( ".connectable_list1").sortable({
    connectWith: '.connectedSortable',
    scroll: false,
    distance: 7,
    distance: 7,
    placeholder: 'placeholder1',
    tolerance: 'pointer'
});

$( ".connectable_list2" ).sortable({
    connectWith: '.connectedSortable',
    scroll: false,
    distance: 7,
    distance: 7,
    placeholder:'placeholder2',
    tolerance: 'pointer'
});

Here is the link to my fiddle so you can test out the issue yourself: My Fiddle
For example, I am not able to drag the last list element of the first column into the first list element spot in the next column.

1 Answer 1

1

It is better to do draggable + sortable for this kind of thing:

 $(".connectedSortable").sortable({
     scroll: false,
     distance: 1,
     placeholder: 'placeholder1',
     tolerance: 'intersect',
     revert: true
 });

 $(".connectable_list1 li").draggable({
     connectToSortable: '.connectedSortable',
 });    

Fiddle

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your help but the draggable function does not seem to solve the problem. A main example of the issue I'm having is that I am not able to drag one list element to the first spot in a different column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.