Wednesday, 2 October 2013

Determining the element a drag stops over

Determining the element a drag stops over

I have a jsfiddle _ http://jsfiddle.net/stevea/US54g/9/ - with four
draggable boxes. I would like to determine the element that a drag stops
at. For example, if I drag box 2 and drop it on box 3, I'd like the
stopDrag handler to be able to tell that the drag stopped over box 3. Or
if I dropped it over the body, where there were no boxes, I'd to know
that. But I don't anything in the event object or the ui object that tells
me the element at those coordinates. Am I missing it somewhere?
Thanks.
<div id="box1" class="box">box1</div>
<div id="box2" class="box">box2</div>
<div id="box3" class="box">box3</div>
<div id="box4" class="box">box4</div>

No comments:

Post a Comment