jquery 计数器插件的 IE 错误

发布于 2024-10-09 02:33:59 字数 607 浏览 0 评论 0原文

我已经实现了一个 jquery 计数器脚本(以不同的增量从 50 到 100 计数),这是我从这个问题中发现的: jQuery 计数器计数到目标数字< /a>

除了在 Internet Explorer 8(可能还有其他 IE 版本?)之外,这些脚本运行良好。

这是来自 IE 的错误消息,其中包含脚本演示创建者的 URL。

Message: 'undefined' is null or not an object
Line: 32
Char: 17
Code: 0
URI: http://www.ulmanen.fi/stuff/counter.php

我只是想知道是否有人知道如何解决这个问题。我猜这与 el.html() 没有找到任何数据有关,但我无法真正弄清楚这一点。

感谢您的帮助 ^^

如果可以的话我会回复该帖子,但我似乎找不到任何方法(我是 stackoverflow 的新手,我认为我缺乏特权)。

I've implemented a jquery counter script (count up from say 50 to 100 with different increments) that I found from this question:
jQuery counter to count up to a target number

The scripts works great except for in Internet Explorer 8 (and possibly other IE versions?).

Here's an error message from IE with the URL to the creator of the script's demo.

Message: 'undefined' is null or not an object
Line: 32
Char: 17
Code: 0
URI: http://www.ulmanen.fi/stuff/counter.php

I'm just wondering if anyone know how this can be fixed. I'm guessing it has to do with el.html() not finding any data but I can't really figure this out.

Thanks for any help ^^

I would reply to that post if I could but I can't seem to find any way of doing so (I'm new to stackoverflow, I think I lack privileges).

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

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

发布评论

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

评论(1

黯然#的苍凉 2024-10-16 02:33:59

虽然不是如何解决问题的确切答案,但我建议使用为此目的的实际 jQuery 插件。

jCountr - 我在我的几个网站上使用此计数器来进行会话管理和超时等操作自动保存表单上的计数器。我可以保证它的易用性并且适用于所有浏览器。它有完整的文档记录,可以配置为向上计数、向下计数、在刻度或完成时调用函数,您可以更改它的刻度间隔等。我强烈建议您检查一下。设置它的简便性将比解决令人痛苦的 Internet Explorer bug 更快。

While not an exact answer on how to fix your problem, I would recommend using an actual jQuery plug-in meant for this.

jCountr - I use this counter on several of my websites for things such as session management and timeouts to auto-save counters on forms. I can vouch for it's ease of use and it works across all browsers. It's completely documented and can be configured to count up, count down, call functions on tick or on finish, you can change the interval it ticks at, etc. I highly recommend checking it out. The ease of setting it up will problem be quicker than working on a painful Internet Explorer bug.

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