droppable image map areas

droppable image map areas


I have an image using an image map, and I would like to set up drag
and drop so that I know what section of the image the item was dropped
on to. I have code like:
$("map > area").each(function(i, node) {
$(node).droppable({
greedy: true,
drop: function(ev, ui) {
console.log("drop on ", $(this).attr("title"));
}
});
});
It sort of works, but when I drop an item onto one of the areas, it
triggers the function for all of the areas. Is there a way to get
that to work?