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.