jQuery iframeFix上的可排序 [英] jQuery iframeFix on a Sortable
问题描述
在CMS上,我有一个缩略图列表(可分级).缩略图效果很好,现在我正在编写一个插件将其拖动到tinyMCE窗口.
On my CMS I have a list of thumbnails (Sortable). The thumbnails work great and now I'm writing a plug-in to drag-them to a tinyMCE window.
由于tinyMCE窗口具有iFrame,因此效果不佳.
As the tinyMCE window has an iFrame it doesn't work that well.
jQuery有一个名为iframeFix的可拖动对象的选项,该选项完全可以按照我的需要工作.但是,该列表必须是Sortables.我已经在Google上进行了广泛的调查,但没有发现我的要求. StackOverflow上的任何人都做过吗?
jQuery has an option for Draggables called iframeFix that works exactly as I need. However that list must be a Sortables. I've looked quite extensively on Google and found no-one with my requirements. Has anyone here on StackOverflow done it?
将iframeFix应用于可排序商品吗?
如果没有,我正在使用jQuery插件.
If not... I'm on my way to a jQuery plug-in.
提前谢谢!
推荐答案
我已经完成了.
您需要在iFrame上有一个DIV,以使Draggable/Sortable顺利进行.因此,我使用jQuery在iframe的顶部创建了DIV.然后,当您抓取元素时显示它,并在放下它时将其破坏.奇迹般有效.如果有人需要这样的东西,请告诉我.
You need to have a DIV on top of the iFrame to let the Draggable/Sortable flow without problems. So I used jQuery to create a DIV right on top of the iframe. Then it show's it when you grab the element and destroys it when you drop it. Works like a charm. If anyone is in need of something like that let me know.
更新(根据受欢迎的请求):
在我的特定情况下,我使用以下DIV:
On my specific scenario I use the following DIV:
<div id="iframeDivFixer" class="ui-draggable-iframeFix" style="background-color: rgb(255, 255, 255); display: none; width: 665px; height: 665px; position: absolute; opacity: 0.001; z-index: 1000; left: 362px; top: 290px; background-position: initial initial; background-repeat: initial initial;"></div>
而且,一旦我抓起缩略图javascript,就将display
属性设置为block
.释放Dragabble时,该过程将相反.
And, as soon as I grab the thumbnail javascript is used to set the display
property to block
. The process is reversed when you release the dragabble.
这篇关于jQuery iframeFix上的可排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!