lightbox-0.5 jquery 兼容性问题
我正在尝试从这里集成 jquery lightbox 插件: http://leandrovieira.com/projects/jquery/ lightbox/
它可以工作,但仅适用于 jquery 1.2.3
当灯箱关闭并第二次启动时,即下一个和上一个链接无法正确循环浏览照片时,
如果我单击下一个链接,照片的顺序开始跳跃,而不是点击一张一张地浏览照片,它会变成 1、3、5 等等
,顺便说一下,只有当我尝试使用键盘箭头导航时,如果我使用鼠标然后它就可以了,但只有键盘
很奇怪,因为我试图解压缩原始提供的示例文件,我只是将 jquery 版本替换为较新的版本,那就是当我发现这个问题时,
我所做的就是将 jquery 版本从1.2.3 至任何较新版本一,这是问题开始的时候
我尝试在 Internet Explorer、Firefox、Chrome、Safari 甚至不同的计算机上运行相同的 html,但仍然是同样的问题
I am trying to integrate the jquery lightbox plugin from here: http://leandrovieira.com/projects/jquery/lightbox/
It is working but only with jquery 1.2.3
When the lightbox is closed and launched the second time, that is when the next and previous links don't cycle through photos properly,
If i click on the next link, the order of photos start to jump like instead of going through photos one by one on click it goes 1, 3, 5 and so on
by the way, this problem happens only when i try to navigate with keyboard arrows, if i use mouse then its fine, but only with keyboard
strange, because i tried to unzip the original provided sample files and I just replaced the jquery version to the newer one and that is when i discovered this problem,
all I did is changed the jquery version from 1.2.3 to any newer one and this is when the problem started
I tried to run the same html in internet explorer, firefox, chrome, safari and even on different computers, but still the same problem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在网络上发布问题页面的链接吗?
另外,您可以尝试将 Lightbox 替换为 Slimbox2 - 它具有几乎相同的 UI,但可以彻底解决错误。
Can you post a link to the problem page on the web?
Also, you could try swapping Lightbox for Slimbox2 - it has a nearly identical UI, but may solve the error outright.
我这样解决了问题:在方法
_set_image_to_view()
中,在行之间添加行_disable_keyboard_navigation();
_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
和
objImagePreloader.onload=function(){};
因此整个方法如下:
I solved the problem this way: in the method
_set_image_to_view()
add the line_disable_keyboard_navigation();
between lines_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
and
objImagePreloader.onload=function(){};
Thus the entire method is as follows: