目前(购买的)JavaScript lightbox 代码可以在我的网站上正常运行,但只能在较旧的 jQuery 库(如 1.3.2 和 1.4.3)上运行,但不能在较新的版本(如 1.5)上运行
The problem on the new jQuery libraries is, that upon clicking a thumbnail the screen first goes into the dark mode but the lightbox never shows up, somewhere during that process it stops. This happens only if I load the new jQuery libraries, which I do prefer to use since all rest of my site works faster it seems with the newer builds.
任何提示我应该在哪里寻找/在哪里找到 Jquery 差异?
非常感谢您的想法。
最佳答案
第 73 行 - “SWFObject 未定义”
编辑: http://blog.jquery.com/2010/11/11/jquery-1-4-4-release-notes/
JQUERY 1.4.4 中向后不兼容的更改 当检查使用“display: none”隐藏的元素时,.width() 和 .height() 方法不再返回 0。要确定某个元素是否隐藏,请始终使用 .is(‘:hidden’)。
您的脚本充满了 height() == 0
或 width() == 0
或使用 width() 或 height() 进行数学计算。
我最好的建议是坚持使用 jQuery 1.4.3 或重写插件\o/
关于javascript - 新的 JQuery 1.5 打破了良好的旧图像灯箱...为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5287379/