jQuery 与鼠标滚轮的冲突
我是一名设计师,正在为澳大利亚红十字会 2004 年海啸清理工作做一个纪念项目。该项目是一个时间表,旨在纪念过去几年所做的所有工作。
注意:作为第一次用户,我不允许包含超过 1 个链接,所以我对我粘贴的所有网址感到抱歉。
我使用两个 jquery 插件来创建时间轴:
这个水平滚动插件来自 JQuery for Designer
请参阅此处 获取演示时间线的直接链接 -
我还使用了 Colorbox 用于显示图片和媒体的 jquery 插件
时间线上有供用户单击并拖动或使用鼠标滚动的功能车轮。
我遇到的问题是,将颜色框代码添加到页面后,鼠标滚轮不起作用。时间线本身就可以很好地工作,就像颜色盒一样,只有当它们添加在一起时才可以。
作为一名设计师,我不知道如何解决这个问题,但是当 jquery.min.js 文件链接到 colorbox 插件时,我已经将焦点缩小到某种冲突。如果我删除头部中此 js 的链接,鼠标滚轮滚动将返回。
任何建议都将受到欢迎。
I'm a designer doing a commemoration project for Red Cross Australia's 2004 Tsunami clean up efforts. The project is a timeline to commemorate all the work that has been done for the last few years.
Note: As a first time user I wasn't allowed to include more than 1 link, so I'm sorry for all the urls I have pasted in.
I'm using two jquery plugins to create the timeline:
This horizontal scroll plugin from JQuery for designers
See here for a direct link to the demo timeline-
I have also used the Colorbox jquery plugin for displaying pictures and media
There is functionality on the timeline for users to click and drag or use the mouse scroll wheel.
I have an issue where the mouse scroll wheel doesn't work after I add the colorbox code to the page. The timeline works fine on its own as does colorbox, its just when they are added together.
As a designer primarily, I don’t know how to fix the issue, but I have narrowed down the focus to some sort of conflict when the jquery.min.js file is linked to for the colorbox plugin. The mouse wheel scrolling returns if I remove the link to this js in the head.
Any suggestions would be welcomed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过简单地将 jquery.js 文件的链接放在 jquery.min.js 文件后面来解决我的问题。
我认为 jquery.min.js 文件正在重置由 jquery.js 文件设置的值。
之后调用此文件,该值不会重置。
I have worked through my issue by simply placing the link to the jquery.js file after the jquery.min.js files.
I think the jquery.min.js file was reseting a value that was set by the jquery.js file.
By placing the call to this file afterwards the value doesn't get reset.