gpt4 book ai didi

javascript - 我有一个分页问题,​​结合 nanoscroller

转载 作者:行者123 更新时间:2023-12-03 07:09:55 26 4
gpt4 key购买 nike

我有这个示例网站,http://www.miguelonenterprises.com/horizontalScroll.html .
我在这个网站上遇到的问题是:
这是一个分页页面。如果我将鼠标放在 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')

关于javascript - 我有一个分页问题,​​结合 nanoscroller,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64780455/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com