I'm trying to create a drag and drop from one list to one of two others. I've been trying to use the draggable and droppable, but this sortable demo looks more like what I want: http://jqueryui.com/sortable/#connect-lists
I'm trying to do it with draggable/droppable because of my strict requirements:
I have several days printed on the page
Each day has 3 lists: inbound, pending and processed
Items from inbound can be dragged to either the pending or processed lists
Those items will be appended to the bottom of the applied list
Items on the pending and processed lists cannot be dragged, except those which originated on the inbound list
Because of these my thoughts were to have the individual inbound list items be draggable and appended to the end of the applied list.
Here is the JS Code I'm using:
$(document).ready(function() {
$('li.drag').draggable({
revert: "invalid",
revertDuration: 100
});
$('.pending-list').droppable({
accept: ".inbound li",
drop: function(event, ui) {
$(this).appendChild($(ui));
}
});
$('.processed-list').droppable({
accept: ".inbound li",
drop: function(event, ui) {
$(this).append($(ui));
}
});
});
Here is my fiddle, but as you can see (1) it's not applying to the bottom of the list and (2) I cannot move it again after: http://jsfiddle.net/wGWTS/1/