仅在一个元素内覆盖滚动功能
我使用 jquery 提供可点击的叠加层,我想用左/右替换默认的向上/向下滚动方法(因此,当您滚动页面时,它会水平移动而不是垂直移动。我担心滚动功能在覆盖层中仍然按预期工作
更新:如果无法滚动浏览器,那么具有滚动条的水平滚动条该怎么办?向上/向下从左向右移动(以及锚点)
我的 JavaScript 经验有些有限,任何有关此事的指导将不胜感激 谢谢!
I'm using jquery to provide clickable overlays, I'd like to replace the default Scroll up/down methods with left/right (So when you scroll the page it moves horizontally not vertically. I'm worried about the scroll function still working as intended within the overlays.
Update: If it's not possible to scroll the browser what about a div that has a horizontal scroll bar that on scroll up/down moves left to right (as well as anchors)
My JavaScript experience is somewhat limited, any guidance with this matter would be greatly appreciated
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了合适的解决方案:
http://plugins.jquery.com/project/ScrollTo
我的代码:
我仍然需要禁用正文中的垂直滚动条,而不禁用页面内元素中的垂直滚动条。
Found an appropriate solution with:
http://plugins.jquery.com/project/ScrollTo
my code:
I still need to disable the vertical scroll bars in the body, while not disabling the vertical scroll bars in elements within the page.