jQuery可拖放和溢出问题 [英] jQuery Draggable and overflow issue

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

问题描述

当我从一个设置为overflow的容器div拖动一个div时,我有一个不期望的效果:滚动。

I am having an undesired effect when I drag a div from a container div which is set as overflow: scroll.

我已经找到了一个其他人的例子他们遇到了这个问题,但是我无法找到一个解决方案。

I have found an example of someone else where they have had the issue but I have been unable to find a resolution

粘贴垃圾箱的示例

发生什么事情是滚动增加了,我可以看到为什么如果你想拖动到目的地在可滚动的div中,但是我希望能够把它放在滚动抓取之外。

What happens is that the scroll is just increased, I can see why this would be the desired behaviour if you wanted to drag to a destination within the scrollable div but I want to be able to take it outside of its scrolling grasp.

推荐答案

它当然支付注意文档

http: //docs.jquery.com/UI/Draggable#option-scroll


滚动



类型:布尔值

默认值: true

如果设置为 true ,容器在拖动时自动滚动。

scroll

Type: Boolean
Default: true
If set to true, container auto-scrolls while dragging.

所有进入这里的人,从我的错误中学习,RT(F)M !!!

All who enter here, learn from my mistake, RT(F)M!!!

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

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