jQuery可拖动IFrameFix [英] jQuery Draggable IFrameFix

查看:73
本文介绍了jQuery可拖动IFrameFix的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对jQuery Draggable IFrameFix有点问题. 我有一个包含iframe的容器(如下所示).我在可拖动设置中打开了iframeFix,但它并没有改变任何东西.有相同问题的任何人或可能知道如何解决此问题的人?

I have a little problem with the jQuery Draggable IFrameFix. I have a container (as shown below) with an iframe inside of it. I turned on the iframeFix in my draggable setup, but it doesn't change a thing. Anyone who had the same problem or anyone who might know how to solve this?

<div class="container">
<div class="toolbar">
    <div class="opt1"></div>
    <div class="opt2"></div>
</div>
<iframe src="url" class="frame" frameborder="0" scrolling="no"><p>No support for iframes</p></iframe>
</div>

这是我的JavaScript代码.

This if my javascript code.

$(".container").draggable({
        snap: ".snapper_col",
        containment: "#element_container",
        handle: '.opt1',
        snapTolerance: 20,
        iframeFix: true,
        cursor: "crosshair",
        start: function(ev,ui){
        },
        drag: function(ev,ui){

        },
        stop: function(ev, ui){

        }
});

谢谢!

推荐答案

已解决.

我在iframe上创建了自己的叠加层,当我开始拖动时,我将其显示并在停止时将其隐藏.这样,iframe便不会与拖动混乱.

I created my own overlay over my iframe and when I start dragging I display it and hide it when I stop. This way the iframe doensn't mess with the dragging.

这篇关于jQuery可拖动IFrameFix的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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