[英]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. 我的页面上有链接,我想将它们的副本复制到另一个进行拖动的div中。
I have already seen How to Drag and Drop in JavaScript and Cross Browser HTML5 Drag and Drop , but they don't work properly. 我已经看过如何在JavaScript和跨浏览器HTML5中拖放 ,但是它们不能正常工作。 When the draggable object is a link it's not possible to drag.
如果可拖动对象是链接,则无法拖动。
I want something simple: to drag the link and get the information in the other div. 我想要简单的东西:拖动链接并在另一个div中获取信息。
I'm using dojo 1.4.3, but the drag and drop is not compatible with IE9. 我正在使用dojo 1.4.3,但是拖放操作与IE9不兼容。 Thus, I cannot use it.
因此,我无法使用它。 The version of dojo cannot be changed, and IE7-9, Firefox, Chrome, and Safari compatibility is required.
dojo的版本无法更改,并且需要IE7-9,Firefox,Chrome和Safari兼容性。
I can't use jQuery. 我不能使用jQuery。
Maybe I can suggest my REDIPS.drag library that is based on dragging DIV elements across tables. 也许我可以建议我的REDIPS.drag库,该库基于在表之间拖动DIV元素。 Dragging layout is defined with table cells and every DIV element with class="drag" will become drag-able.
拖动布局是通过表格单元格定义的,每个具有class =“ drag”的DIV元素都将变为可拖动的。
DIV element can contain any HTML content like another table or a link. DIV元素可以包含任何HTML内容,例如另一个表或链接。 It's also possible to clone DIV elements - as you need to copy original links.
也可以克隆DIV元素-因为您需要复制原始链接。
Here is link to the library with live demo (please pay attention to the orange DIV element with Smile text - Smile is a link): 这是带有实时演示的库链接(请注意带有微笑文本的橙色DIV元素- 微笑是链接):
http://www.redips.net/javascript/drag-and-drop-table-content/ http://www.redips.net/javascript/drag-and-drop-table-content/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.