Jonathan Wood
Jonathan Wood

Reputation: 67185

Get Drop Target During jQuery Draggable Drag Event

I'm learning to use the jQuery UI Draggable Widget. I need to do some special handling in response to the Drag event.

From my Drag event handler, is there a way to get the current drop target--that is, the element that the mouse is currently hovering over?

Upvotes: 1

Views: 2603

Answers (2)

Marcel Burkhard
Marcel Burkhard

Reputation: 3523

You could use the hoverClass attribute in the droppable target and check which drop zone has the hoverClass in the drag event.

It's a little bit hacky but it would work.

Upvotes: 0

Amar
Amar

Reputation: 1936

In drag event there is no way to get current hovering element, however you can get this from "Droppable" drop event. Check this JQFAQ.com topic, which will explain how to do this.

Upvotes: 3

Related Questions