How to recognize a drag element over an element?

I have a problem with jQuery Drag & Drop. I have a drag element and a lot of dropTarget, so I just want to know when I drag, my drag element - what is the element above?

Btw, Firefox provides an event.originalTarget that points to a DOM element, but it is "undefined" in Google Chrome.

Any suggestion?

Thank.

+5
source share
1 answer

View the overevent in your droppables.

$('#droppableid').droppable({
    over: function(event, ui) {
        log('You are over item with id ' + this.id);
    }
});

An example is here .

+6
source

All Articles