Joomla 的幻灯片模块在 Chrome 上不起作用

发布于 2024-12-17 06:28:55 字数 1348 浏览 1 评论 0原文

我正在为 Joomla CMS 1.5 版使用基于 Nivo Slider 的图像幻灯片模块。 该模块基于 jQuery,我们为此使用 jQuery 1.6.3

该滑块在 FireFox 和 IE 上运行得非常好,如我们网站上所示。 它曾经在 Chrome 上运行良好(使用版本 14 进行测试) - 但现在不再适用,我也不知道为什么。

在 Chrome 上,所有图像加载正常,但是,只显示第一张幻灯片,我相信 jQuery 脚本返回错误。控制台返回以下错误:“无法读取未定义的属性‘defaultView’”,位于文件 jquery.min.js 第 4 行。 结果是一张静态图像 - 第一张幻灯片。其他所有内容都在那里,CSS、初始化 jQuery 脚本和所有涉及的 HTML。

我已经使用 Chrome 版本 14 和 15 进行了检查。 在这两个版本中,结果是相同的。

我也已经尝试过卸载并重新安装模块、使用默认值、更改图像和设置。文本等等,但似乎没有什么能让它在 Chrome 上再次运行。我在不同的计算机上进行了检查,看看是否可能是 Chrome 缓存的问题,就像 Chrome 中最初的 Nivo Slider 错误一样。我什至尝试加载不同版本的 jQuery,一直回到 1.4,但仍然没有变化

请注意,我应用了一些脚本和 CSS 来补充滑块,更具体地说,有一个脚本将第一张幻灯片变成 Youtube 嵌入播放器,并应用了一些用于标题样式的 CSS。 JavaScript 和CSS 添加在 Chrome 上工作正常,但是,即使删除我添加的所有更改,滑块模块仍然无法工作!

让我再次强调,它以前在 Chrome 上工作更重要的是 - 它在 Firefox 和 IE 上运行得非常好。我不知道是什么导致了这种变化。

PS 显然,您可以在 Firefox 或 IE 上查看,看到该模块上的所有内容都可以正常工作,包括我添加的 CSS 和 Javascript。

I am using a Nivo Slider based image slideshow module for Joomla CMS, version 1.5. The module is jQuery based and we are using jQuery 1.6.3 for this one.

The slider works perfectly fine on FireFox and IE, as can be seen on our website. It used to work fine on Chrome, too (tested with version 14) - but it doesn't anymore and I don't have a clue why.

On Chrome, all the images load fine, however, only the first slide is displayed and I believe the jQuery script returns an error. The console returns the following error: "Cannot read property 'defaultView' of undefined", on file jquery.min.js, line 4.
The result is a still image - the first slide. Everything else is there, the CSS, the initializing jQuery script and all the HTML involved.

I checked it already with Chrome versions 14 and 15. In both versions the result are the same.

I also already tried uninstalling and re-installing the module, using the default values, changing images & text and so on but nothing seems to get it working again on Chrome. I checked it out on different computers to see if it might be a problem with Chrome's cache, like the original Nivo Slider bug with Chrome. I even tried loading different versions of jQuery, all the way back to 1.4, but still no change.

Please note I have applied some scripting and CSS to complement the slider, more specifically there's a script that turns the first slide into a Youtube embed player and some CSS for caption styling. The javascript & CSS additions work fine on Chrome, however, even when removing all the alterations I added, the slider module still doesn't work!

Let me stress again that it did work on Chrome before, more over - it does work perfectly fine on Firefox and IE. I have no idea what had caused the change.

P.S. obviously you can take a look on Firefox or IE and see that everything on that module works including the CSS and Javascript I added.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等往事风中吹 2024-12-24 06:28:55

我发现这个问题,它发生是因为 jquery 库和 mootools 库之间存在冲突。您可以进入 "media/system/js/mootools.js" 并将 mootools.js 重命名为 _mootools.js 例如,它可以工作。
我知道有一种更优雅的方法来修复它,您可以在代码中启用 Jquery.noConflict() 。但我没有尝试。
祝你好运

I found the problem, it happens because there is a conflict between jquery library and mootools library. You can go in "media/system/js/mootools.js" and rename mootools.js to _mootools.js for example and it works.
I know that there is a more elegant way to fix it, where you can enabled a Jquery.noConflict() in your code. But I didn't try it.
Good Luck

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文