开发者

How to connect to arbitary DOM elements using draggable in jQuery?

I've found a article that explains how to connect draggable elements to sortable ones:

http://the-stickman.com/files/jquery/draggable-sortable.html

But what I need is to connect draggable elements to arbitary DOM elements,

I need to do something when I drop it on some e开发者_开发问答lement.

But how know the element that the draggable is on when I drop it?


Create a droppable, and use $(this) inside the ondrop function you set to refer to the droppable, and then do the connection.

http://jqueryui.com/demos/droppable/#event-drop

I believe that should do it, unless I misunderstand your problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜