JQuery Hilight 插件有替代品吗?
When I found Hilight I almost fell down my chair. It's exactly what I need :)
Now, the sad thing is that the demo doesn't seem to work in IE8. Are there any fixes or alternatives out there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过maphilight源代码进行调试,发现IE8在为新创建的样式表添加规则时会卡住。 当我在 Google 上搜索这个特定问题时,我发现了有关 OpenLayer 轨道的错误报告。 错误报告有一个补丁,我在 maphilight 插件上使用了这个补丁来修复它。
这就是你需要做的。 打开 jquery.maphilight.js(未压缩的源代码)并转到第 63 行,您将看到类似以下内容:
将上面的内容替换为以下内容:
现在应该可以在 IE8 中运行。 这是证据,看看怀俄明州是如何突出显示的。
我不确定这是否适用于 IE6 和 IE7。 您必须亲自测试一下。 如果此补丁在 IE6 和 IE7 中出现问题,则仅当浏览器为 IE8 时才需要安装此补丁。
再次将上述补丁归功于原作者。 我只在maphilight插件中调试了这个问题。
I debugged through maphilight source code and found that IE8 chokes while adding the rule for newly created stylesheet. When I searched on Google for this particular problem, I found a bug report on OpenLayer's track. The bug report had a patch and I used this patch on maphilight plugin to fix it.
Here's what you need to do. Open jquery.maphilight.js (uncompressed source) and go to line 63, you will see something like following:
Replace the above with following:
It should now work in IE8. Here's the proof, see how Wyoming is highlighted.
I am not sure if this will work in IE6 and IE7. You will have to test it yourself. If this breaks in IE6 and IE7, you will have to put this patch only when browser is IE8.
Once again, credit for the above patch to the original author. I only debugged the issue in maphilight plugin.