I am using jQuery to detect drop on target, the target in question is a image. If i drag one image upon another, and then drop it, it shall replace the target source with the dropped source. This works fine until two images lies upon each other.
Some of the images lies next to each other and some times the target images overlap. if i drop, both the visible image and the image beneath is replaced with the dragged image.
$("#drag img").draggable({
drag: function(event) { //somethings }
});
$("#target img").droppable({
accept: '#drag img',
drop: function() {//change src }
});
A live exampel<-Removed, try to drag an image to the right image
I hope the problem is clear and their is any good solution.