Nivo Slider 不适用于具有真正简单历史 (RSH) 的 webkit 浏览器

发布于 2024-11-02 02:04:27 字数 665 浏览 10 评论 0原文

我正在构建一个 AJAX 支持的网站,它使用真正简单的历史 (RSH) 框架来处理后退和转发请求。

我还使用 Nivo Slider 进行简单的幻灯片放映。在 Firefox 甚至 IE 中,这都可以正常工作。然而,在 Chrome 和 Safari 中,第一张图片会加载,但也仅此而已 - 导航项目符号点不会出现,幻灯片也不会更改。

真正奇怪的是没有错误消息。不在 Firebug 或 Chrome 的 Javascript 控制台中。

我发现罪魁祸首是 json2007.js,它包含在 RSH 中。如果我将其注释掉(以及 RSH 的其余部分),则幻灯片将完美运行。

我最初认为 JSON 和 JQuery 可能彼此存在问题,因此我包含了 JQuery-JSON 但这没有帮助。

还有其他人遇到过这个问题吗?我做了什么愚蠢的事情导致了这个问题吗?

这是有问题的网站:http://camiraenergy.co.uk/。幻灯片仅在主页上可用。这应该是很明显的。 (该网站仍在建设中,因此有些内容没有意义。)

感谢您的帮助!
缺口

I am building an AJAX powered website which uses the Really Simple History (RSH) framework to handle back and forward requests.

I'm also using Nivo Slider for a simple slideshow. In Firefox and even IE, this works fine. However, in Chrome and Safari, the first picture loads but that's as far as it gets - the navigation bullet points don't appear and the slides don't change.

The really strange thing is that there are no error messages. Not in Firebug or in Chrome's Javascript console.

I've discovered that the culprit is json2007.js which is included as part of RSH. If I comment this out (along with the rest of RSH), the slideshow works perfectly.

I originally thought that JSON and JQuery might be having problems with each other so I included JQuery-JSON but that didn't help.

Has anyone else had this problem? Is there something stupid that I've done which is causing the problem?

This is the website in question: http://camiraenergy.co.uk/. The slideshow is only available on the homepage. It should be pretty obvious. (This site is still under construction so some things don't make sense.)

Thanks for your help!
Nick

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

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

发布评论

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

评论(1

请爱~陌生人 2024-11-09 02:04:27

通过使用 json2.js 解决了这个问题。

您必须将 window.dhtmlHistory.create() 更改为

window.dhtmlHistory.create({
  toJSON: function(o) {
    return JSON.stringify(o);
  }, fromJSON: function(s) {
    return JSON.parse(s);
  }
});

Solved it by using json2.js instead.

You have to change window.dhtmlHistory.create() to

window.dhtmlHistory.create({
  toJSON: function(o) {
    return JSON.stringify(o);
  }, fromJSON: function(s) {
    return JSON.parse(s);
  }
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文