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

标签 javascript html css pagepiling.js nanoscroller

我有这个示例网站,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/

相关文章:

html - 无法将图像设置为 100% 宽度(不是因为容器太小,也不是背景)

javascript - 如果未选中复选框,如何禁用页面加载时的输入字段?

html - 如何在没有 JS 或 flexbox 的情况下根据 CSS 中的总数选择所有列表元素?

php - CSS 无法将表格宽度设置为随屏幕宽度动态变化

javascript - 使用 Javascript 读取文件

javascript - 自定义模块: Uncaught TypeError: undefined is not a function

html - 在自定义 SharePoint MasterPage HTML 中使用 Web 字体

javascript - 使用 ng-Options 如何过滤准确解释给定值的内容

javascript,如何按类从输入中获取值?

jquery - 即位置相对错误