jQuery使Internet Explorer崩溃 [英] jQuery crashing Internet Explorer

查看:92
本文介绍了jQuery使Internet Explorer崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,基本上,我正在设计和开发一个围绕jQuery的使用的相当复杂的网站.我对jQuery的了解真的很差,这是我第一次正确使用它.我之前在这里发布了一个有关脚本的问题,显然它很糟糕,但是我没有向您确切显示我实际上为它编写的内容,现在可以了..因为我已将其上载到测试目录. 现在,它可以在除IE之外的所有浏览器中正常工作. CSS样式即将实现,应该很快就要完成了!但是,Internet Explorer显示严重问题.在IE 7,8中,它看起来不错,但是当您将鼠标悬停在链接上时,它将立即崩溃. IE 6,显示屏似乎根本无法正常工作.但是IE 6的问题要小一些.

Okay basically, I'm designing and developing a fairly complicated website which revolves around the use of jQuery.. My knowlege of jQuery is really poor and this is the first time I've properly used it. I posted a question here before about the script and apparently its awful, but I didn't show you exactly what I was actually writing it for, which I can now.. Because I've uploaded it onto a test directory. It now works fine in every browser other than IE. The CSS styling is getting there and it should be close to finish soon! However, Internet Explorer is showing bad problems.. In IE 7,8 it looks fine but when you go to hover over a link, it immediately crashes. IE 6, the display doesn't seem to be working properly at all. But IE 6 is a lesser problem.

如果您可能只花5到10分钟来重写一个简单的脚本(可能要花我10个小时),我将非常感激! 网站继承人- http://openyourheart.org.uk/test/index.html

If you could take just 5 or 10 minutes to potentially rewrite a simple script which would potentially take me 10 hours, I would be so so grateful! Heres the site - http://openyourheart.org.uk/test/index.html

如果需要,我可以发送所有压缩文件.

I can send all the files zipped if required.

先谢谢您.

布拉德利

推荐答案

在深入研究崩溃之后,我发现只有两个盒子实际上是导致崩溃的原因.通过脚本的体验,我发现淡入图像是导致此问题的原因,如果我将它们拿走,效果很好. 太好了,我在查找图像渐渐消失的div之间寻找差异,发现崩溃的盒子既有ID又有类..这似乎在起作用吗?我删除了ID,只留下了空白方块"类,并且该类正常运行而没有崩溃.

After investigating deeper into the crashing, I discovered that only two of the boxes were actually causing the crashes. Experienting with the script, I found that the fade In images were causing it and if I took them away it worked fine.. Sooo, I looked for differences between the divs were the images were fading into and found that the crashing boxes had an ID as well as a class.. This seemed to be effecting it?! I removed the ID and just left the "blank square" classes and it worked without crashing.

原始-

<div id="row1square2" class="blank square">
  <div class="square whoweare">ESTABLISHED<br/>FOR OVER<br /><span id="thirtyyears">30 YEARS</span></div>

新版本-

<div class="blank square">
  <div class="row1square2 square whoweare">ESTABLISHED<br/>FOR OVER<br /><span id="thirtyyears">30 YEARS</span></div>   

我不知道为什么会产生效果,但是该站点非常接近完成并且即将到来,非常感谢您的所有帮助和评论,我已经尝试实施并继续研究您的建议. 我还有一个我似乎无法解决的问题,因此我在这里将其发布为新问题.

I have no idea, why this would be having an effect, but the site is very close to completion and coming and great thanks to all your help and comments, I've tried to implement and continue working on your suggestions. I do have one other issue, which I cant seem to resolve, so I've posted it as a new question here..

在IE 7及更低版本中隐藏水平滚动条

再次感谢您, 布拉德利

Thanks Again, Bradley

这篇关于jQuery使Internet Explorer崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆