To get the id of both the draggable and the droppable elements use the following:
$('.selector').droppable({ drop: Drop });
function Drop(event, ui) {
var draggableId = ui.draggable.attr("id");
var droppableId = $(this).attr("id");
}
Sorry might be a little late for you but I have just started using jquery and needed the exact thing.