Hey there,
stani a écrit :
> I have a page with a sortable list and a droppable "trash can". I
> would like to drag and drop items between the list and the trash can,
> but it don't work. Which options should I set to make it works
> correctly?
1) Make sure your Droppables.add options include the sortable element
(container)'s ID in its 'containment' option.
2) To effectively remove the element when dropped, put this in the
trashcan's onDrop callback:
onDrop: function(item) {
$(item).remove();
// More code, e.g. AJAX sync...
}
'should do the trick. Otherwise, the Shop example on the wiki does
this, too.
--
Christophe Porteneuve aka TDD
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---