我有这个示例网站,http://www.miguelonenterprises.com/horizontalScroll.html .
我在这个网站上遇到的问题是:
这是一个分页页面。如果我将鼠标放在 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')
关于javascript - 我有一个分页问题,结合 nanoscroller,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64780455/