开发者

Drag and Drop links in JavaScript

I have links on my page, and I want to make a copy of them to another div doing a drag.

I have already seen How to Drag and Drop in JavaScript and Cross Browser HTML5 Drag and Drop, but they don't work properly. When the draggable object is a link it's not possible to drag.

I want something sim开发者_如何学Cple: to drag the link and get the information in the other div.

I'm using dojo 1.4.3, but the drag and drop is not compatible with IE9. Thus, I cannot use it. The version of dojo cannot be changed, and IE7-9, Firefox, Chrome, and Safari compatibility is required.

I can't use jQuery.


Maybe I can suggest my REDIPS.drag library that is based on dragging DIV elements across tables. Dragging layout is defined with table cells and every DIV element with class="drag" will become drag-able.

DIV element can contain any HTML content like another table or a link. It's also possible to clone DIV elements - as you need to copy original links.

Here is link to the library with live demo (please pay attention to the orange DIV element with Smile text - Smile is a link):

http://www.redips.net/javascript/drag-and-drop-table-content/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜