Reputation: 45
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.
Upvotes: 1
Views: 375
Reputation: 7377
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',
});
Upvotes: 1