开发者

How to know the dragging element is over which element?

I have a problem with jQuery Drag&Drop. I have a draggable element and lots of dropTarget so I just want to k开发者_Python百科now when I am dragging, my dragging element is over which element?

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

Any suggestion?

Thanks.


Check out the over event on your droppables.

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

Example here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜