I would like to do a '.remove' of a draggable element after I drop it
on a droppable item. The problem is I only have the element available
at that time, and it looks like you need the element's draggable
handle so that you can call '.destroy' on it.
It would be better to have a '.remove' function on the Draggables
object that accepts the dragged element that was dropped.
I think it would look like this (under 'var Draggables = {' )...
remove: function(element) {
var draggedItem = this.drops.detect(function(d) {
return d.element==$(element)
});
if (draggedItem) {
draggedItem.destroy()
};
},
Any thoughts out there?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---