我有一个 pagepiling 问题,将其与 nanoscroller 相结合
I have a pagepiling question, combining that with nanoscroller
我有这个示例网站,http://www.miguelonenterprises.com/horizontalScroll.html。
我在这个网站上遇到的问题是:
这是一个 pagepiling 页面。如果我将鼠标放在 nanoscroller 部分并向下滚动,页面将滚动到第二页。
我想要做的是当鼠标在 nanoscroller 部分内时,它上下滚动 nanoscroller 部分而不将 pagepiling 移动到下一页。如果鼠标在 nanoscroller 部分之外,则它会移动到下一个 pagepiling 页面。
有人有什么想法吗?
使用normalScrollElements
选项。详尽on the pagePiling.js docs:
normalScrollElements:
(default null
) 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')
好的,我刚看了另一个条目。我将条目更改为 normalScrollElements: '.main',并且效果很好。谢谢你的想法,现在我可以继续这个项目了。
我有这个示例网站,http://www.miguelonenterprises.com/horizontalScroll.html。
我在这个网站上遇到的问题是: 这是一个 pagepiling 页面。如果我将鼠标放在 nanoscroller 部分并向下滚动,页面将滚动到第二页。 我想要做的是当鼠标在 nanoscroller 部分内时,它上下滚动 nanoscroller 部分而不将 pagepiling 移动到下一页。如果鼠标在 nanoscroller 部分之外,则它会移动到下一个 pagepiling 页面。
有人有什么想法吗?
使用normalScrollElements
选项。详尽on the pagePiling.js docs:
normalScrollElements:
(defaultnull
) 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')
好的,我刚看了另一个条目。我将条目更改为 normalScrollElements: '.main',并且效果很好。谢谢你的想法,现在我可以继续这个项目了。