I have a tiny javascript which uses JQUERY UI.
When I get the ‘drop’ event call I would like to know what HTML Element was dropped.
Can somebody tell me how to figure that out.
I know how to figure which HTML element received the event but I don’t know how to figure which HTML element was dropped
$(function() {
$( "#draggable,#draggable2,#draggable3" ).draggable({ revert: "invalid" });
$( "#draggable,#draggable2,#draggable3" ).droppable({
accept: "#draggable,#draggable2,#draggable3",
activeClass: "ui-state-hover",
hoverClass: "ui-state-active",
drop: function( event, ui ) {
alert("destination:"+ this.id+" source:"+event.target.id);
alert("source is "+"???");
});
});
In the
dropfunction it will beui.draggable.