JQuery UI: is it possible to know where an object has been dropped?

Posted by Jack Duluoz on Stack Overflow See other posts from Stack Overflow or by Jack Duluoz
Published on 2011-01-09T10:50:41Z Indexed on 2011/01/09 10:53 UTC
Read the original article Hit count: 178

Filed under:
|
|

Hi, what I want to do is to know where (not in terms of position (x, y), but a reference to the DOM element) an object was dropped.

I have a grid made up with divs where you can drop various items and I need to know which div on the grid was the item dropped on (getting its id would be fine). The callback function

function(event, ui) { //code here }

has just that ui object who doesn't apparently contain any information about this, but only about the draggable item or its helper.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery