在父框架和子iframe之间拖放元素 [英] Drag-Drop elements between parent frame and child iframe

查看:795
本文介绍了在父框架和子iframe之间拖放元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用jQuery在父框架和iframe之间拖放元素。
我在父框架中有一个面板,其中包含一些可拖放到子框架上的可拖动项。我试图搜索很多但找不到很多...

I am trying to drag-drop elements between parent frame and iframe using jQuery. I have a panel in parent frame which contains some draggable items which can be dropped on the child frame. I tried to search a lot but couldn't find much...

我试图通过在子框架内附加元素来解决它,然后尝试触发可拖动在程序上新插入的元素上,但是我也被卡在了那里。找不到触发拖动功能的正确方式。 (可拖动元素有一个帮助器,当触发mousedown.draggable触发拖动时,ui-draggable元素上的位置更改,但看不到帮助器。

I tried to work around it by appending the element inside the child frame and then trying to trigger draggable on the newly inserted element programmatically, but I got stuck there as well. Couldn't find the proper way to trigger the drag function. (The draggable element has a helper. When I trigger drag by triggering "mousedown.draggable" the position on the ui-draggable element changes but I cannot see the helper.

谢谢!!

推荐答案

使用HTML5拖放API创建跨框架和跨浏览器实现
http://blog.stackhive.com/post/137799349684/构建无缝拖放界面

Using HTML5 Drag and Drop API to create Cross Frame and Cross Browser Implementation. http://blog.stackhive.com/post/137799349684/building-a-seamless-drag-and-drop-interface

编辑 - 以前的链接无效(dockPHP被重新标记为StackHive),所以有写出一个更完整的文章,可以帮助创建史诗般的拖放界面。

EDIT - The previous link wasn't valid (dockPHP got rebranded as StackHive) so have written out a more complete post that can help in creating an epic drag and drop interface.

这篇关于在父框架和子iframe之间拖放元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆