In HTML file, I would like to drag one item and dropped to the target,suppose I would like to drop another item to the same position, at that time both items should be override.If both items are overrides the new item should be revert to original position.Can any one help me how to revert the new item to the original position. Here is my code.
<!-- language: lang-js -->$(function () {
$(".draggable2").draggable({
revert: "invalid"
});
$("#droppable").droppable({
drop: function () {
//var xPos = offset.left;
//var yPos = offset.top;
//alert( $(this).position().left );
$(this).find("p").html("Yes,it is dropped!");
}
});
});
JSFiddle is : here
-Thanks.