Matthew
Matthew

Reputation: 15662

jquery ui - referencing dropped element

So I know that if an element is droppable, then you can set an option like:

drop: function(){
 alert('something was dropped');
}

but how can I set it so I can reference the element dropped onto it, so I could do something like this:

drop: function(){
 alert(elementId + ' was dropped');
}

Thanks.

Upvotes: 1

Views: 165

Answers (1)

hunter
hunter

Reputation: 63562

drop: function(event, ui) {
    alert($(ui).attr("id") + " was dropped");
}

Upvotes: 2

Related Questions