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

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

问题描述

当我从设置为溢出的容器 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 Draggable 和溢出问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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