问题描述
我一直在努力进行这项工作.
I have been pulling my hair out trying to make this work.
我有两个相连的可排序对象,定义如下:
I have two connected sortables, defined like so:
var sortlists = $("#List1, #List2").sortable(
{
appendTo: 'body',
tolerance: 'pointer',
connectWith: '#List1, #List2',
revert: 'invalid',
forceHelperSize: true,
helper: 'clone',
scroll: true
});
此处是指向 jsfiddle示例的链接
由于页面设置,两个可排序项都包含在div中,并带有溢出:自动将它们也包装在父容器中,且溢出设置为隐藏.为了论证,可以说没有办法解决.
Because of the page setup, both sortables are being contained in div's with overflow: auto they are also wrapped in parent containers with overflow set to hidden. For arguments sake, lets say there is no way around that.
有没有一种方法可以在将辅助对象定位到容器的下边缘或上边缘时使容器元素滚动?
Is there a way to make the container element scroll when the helper is being positioned towards the lower or upper edge of the container?
任何帮助将不胜感激!
推荐答案
有了helper:'original'
,我得到了您想要的滚动行为(在Opera 11.61中).
With helper:'original'
, I get the scrolling behaviour you seek, (in Opera 11.61).
这篇关于具有溢出自动功能的jQuery可排序容器滚动div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!