jquery.fullPage.js如何在div中启用滚动,而不影响部分滚动 [英] jquery.fullPage.js how to enable scroll within a div without affecting the sections scroll

查看:1721
本文介绍了jquery.fullPage.js如何在div中启用滚动,而不影响部分滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对,这不容易解释...我为网站使用jquery.fullPage.js。我有几个可折叠面板托管大量的副本,需要滚动。我的问题从我启用此面板上的滚动开始,因为它发送到下一部分。

Right, this is not easy to explain... I'm using jquery.fullPage.js for a website. I have a few collapsable panel hosting a big amount of copy which requires scroll. My problem begins when I enable the scroll on this panel because it sends me to the next section. Is there any way for me to scroll within this panel without affecting the full page scroll?

感谢伙伴

推荐答案

是的, fullpage.js插件提供了一个名为 normalScrollElements code>。详情请参阅文档

Yeah, fullpage.js plugin offers an option called normalScrollElements. As detailed in the documentation:


如果您要避免在滚动某些元素时进行自动滚动,这是您需要使用的选项。 (用于地图,滚动div等)它需要一个字符串的jQuery选择器为这些元素。 (例如:normalScrollElements:'#element1,.element2')

If you want to avoid the auto scroll when scrolling over some elements, this is the option you need to use. (useful for maps, scrolling divs etc.) It requires a string with the jQuery selectors for those elements. (For example: normalScrollElements: '#element1, .element2')

如果你需要更多的控制,你可以使用fullpage.js方法 setAllowScrolling 允许自动滚动或禁用它。这样,您可以在打开弹出式窗口时将其禁用,并在关闭弹出式窗口后再次启用。

If you need more control you can always use the fullpage.js method setAllowScrolling to allow the autoScrolling or disable it. This way you can disable it when opening a popup, for example, and enable it again once you close it.

这篇关于jquery.fullPage.js如何在div中启用滚动,而不影响部分滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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