jQueryUI droppable and sortable - cant change the order and few bugs i cant fix

TuptintuitH

New Member
I have put most of the code together, just cant get few things working: - [*]Items in the "Selected DVD's" area I need to be able to change the order of these DVDs in this list only, so i can change the order from 1,2,3 to 3,1,2.[*]Items in the "Un-selected" area wont drag up into the selected dvds area[*]If i click on the link at the top "add all unselected dvd's" and then click on the link "Remove all selected dvds" it doesnt add them into the correct area at the bottom. However if you click the "Remove all selected dvds" link first... it works[*]Following #3 if i then add a new dvd at the top right, sometimes it adds loads of the same dvd?Here is a working demo of what i have so far:http://jsfiddle.net/BFWzS/1/There is more code in the fiddle above ^\[code\]// let the gallery items be draggable$( "li", $gallery ).draggable({ cancel: "a.ui-icon", // clicking an icon won't initiate dragging revert: "invalid", // when not dropped, the item will revert back to its initial position containment: "document", helper: "clone", cursor: "move"});// let the trash be droppable, accepting the gallery items$trash.droppable({ accept: "#gallery > li", activeClass: "ui-state-highlight", drop: function( event, ui ) { deleteImage( ui.draggable ); }});\[/code\]Hope someone can help us out,Cheers
 
Back
Top