开发者

IE hanging on js errors

The page hangs for a long time in IE but Chrome/FF power right through it.

Here's the page in question http://174.120.239.48/~peakperf/

=============

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6.0; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729) Timestamp: Mon, 7 Mar 2011 21:18:49 UTC

Message: Not implemented

Line: 432 Char: 7 Code: 0 URI: http://174.120.239.48/~peakperf/wp-content/themes/strausberg/js/jquery.simplemodal-1.4.1.j开发者_StackOverflows

==========

Here's the pastebin of the js: http://pastebin.com/xXaCK6XH

Here's the js in question: http://174.120.239.48/~peakperf/wp-content/themes/strausberg/js/jquery.simplemodal-1.4.1.js

Thank you!


You need to make sure any Javascript (jQuery) that manipulates the DOM happens in the ready() event of the document.

In several places in your HTML, you're modifying the DOM right when the script tag gets parsed. Now, if you look in the IE dev toolbar, you'll notice the following:

SCRIPT16385: Not implemented

jquery.simplemodal-1.4.1.js, line 432 character 7
LOG: [cycle] DOM not ready, queuing slideshow 
LOG: [cycle] DOM not ready, queuing slideshow 
LOG: [cycle] DOM not ready, queuing slideshow 
LOG: [cycle] terminating; too few slides: 0 
LOG: [cycle] terminating; zero elements found by selector 

I think the offending Javascript is:

<Script type="text/javascript">
jQuery(".basic").modal({overlayClose:true});
</script>

Which should be changed to:

<script type="text/javascript">
  jQuery(document).ready(function() {
    jQuery(".basic").modal({overlayClose:true});
  });
</script>


This website says that function (removeExpression) is not supported by IE8 as it is deprecated: http://help.dottoro.com/ljuvxilu.php


Just ran into this issue, was using a reserved JS word and IE was throwing this error. :| Hope it helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜