I can get the id of the item I have dropped on with the below code, but if i try to change the alert to get the id of the dragged item, nothing happens. e.g. alert(ui.draggable.attr('id') );
$(function() {
function dropCallback(e) {
alert("The firing droppable item was " + e.target.id );
};
$("#draggable").draggable({axis:"x"});
var dropOpts = {
accept:"#draggable",
drop:dropCallback,
greedy:true
};
$(".target").droppable(dropOpts);
});