From the drop event documentation:
This event is triggered when an
accepted draggable is dropped ‘over’
(within the tolerance of) this
droppable. In the callback,$(this)
represents the droppable the draggable
is dropped on. Whileui.draggablerepresents
the draggable.
So:
$("#dock").droppable({
drop: function(event, ui) {
// do something with the dock
$(this).doSomething();
// do something with the draggable item
$(ui.draggable).doSomething();
}
});