-1

我刚刚将一个应用程序更新到 jQuery 1.9 并升级到 FancyBox 2.0。当 Fancybox 可见时,我喜欢滚动外部页面。

此功能是否已删除?也许是因为它的新响应能力。我在 API 或更新中找不到它。由于切换 Fancybox 时隐藏了外部滚动条,我正在换班。如果外部页面滚动功能已被删除,我将修复一些问题。

谢谢你。

4

1 回答 1

4

使用fancybox 2,滚动外部页面是locked,但是您可以在选项中启用/禁用该功能,helpers例如:

$(".fancybox").fancybox({
    helpers: {
        overlay: {
            locked: false // if true (default), the content will be locked into overlay
        }
    }
});

如果您还希望 fancybox 沿页面滚动,请添加 API 选项autoCenter 并将其设置为false

$(".fancybox").fancybox({
    helpers: {
        overlay: {
            locked: false // if true, the content will be locked into overlay
        }
    },
    autoCenter : false // fancybox will scroll along the content
});

JSFIDDLE

于 2013-03-27T20:42:02.637 回答