Here is an ugly version of what you need to do based on the http://jsfiddle.net/XUFUQ/6/ update. It is best to discard the recoverable code:
// let the trash be droppable, accepting the gallery items $trash.droppable({ accept: "#list1 > li", drop: function( event, ui ) { $("#list2").append(ui.draggable); addElements(); $( "li", $gallery ).draggable({ cancel: "button", // these elements won't initiate dragging revert: "invalid", // when not dropped, the item will revert back to its initial position containment: "document", helper: "clone", cursor: "move" }) } });
Basically, the draggable call only connects to elements that exist during its launch. This adds various mouse processing events to each element. If you add elements, they donβt know anything about them, so you need to call draggable on them again.
The other two answers provide examples of where you can add draggable to ensure that elements are included, but this is an exercise for coding.
source share