在jQuery的AJAX请求IE6 / 7冻结 [英] IE6/7 Freezing during jQuery AJAX request
问题描述
我用下面的code在一些HTML调用,并显示它。大多数浏览器似乎处理得很好,但IE6和7冻结起来。不幸的是,要求能有时需要超过几秒钟,所以延迟是显着的。
I'm using the following code to call in some html, and display it. Most browsers seem to handle it fine, but IE6 and 7 freeze up. Unfortunately, the request can sometimes take more than a few seconds, so the delay is noticeable.
我还呼吁的fancybox上的成功,使返回的HTML可以有一个启动一个模态窗口的链接。
I'm also calling Fancybox on success, so that the returned html can have a link that launches a modal window.
code:
$.ajax({
url: 'url',
success: function(data) {
$('#videolink').hide();
$('#videolink').html(data).slideDown();
$("a#video").fancybox({
'hideOnContentClick': false,
'transitionIn' : 'elastic',
'transitionOut' : 'fade',
'titleShow' : false,
'scrolling' : 'no',
'onStart': function() { _gaq.push(['_trackEvent', 'Event Title', 'Value']); },
'callbackOnClose': function() { $("#fancy_content").empty();}
});
}
});
这是处理请求的最佳方法是什么?
Is this the best way to handle the request?
推荐答案
是您使用100%的CPU IEXPLORE进程?如果是的话,那么问题是缓慢的DOM操作通过IE浏览器。 尝试注释掉成功回调线检查,如果你能找到有问题之一... ...
Is your iexplore process using 100% CPU? If yes, then the problem is with slow DOM manipulation by IE. Try commenting out lines in success callback to check if you can find the offending one...
这篇关于在jQuery的AJAX请求IE6 / 7冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!