ie6 7 ajax无效,IE6/7 Freezing during jQuery AJAX request

博客讨论了一段JavaScript代码,在大多数浏览器中正常工作,但在IE6和7中导致浏览器冻结。代码使用AJAX从URL获取HTML内容,并在成功后用下滑动效果显示。同时,它还触发了Fancybox以创建模态窗口。由于请求可能延迟,这在IE6和7中变得明显。作者询问是否这是最佳的处理方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

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?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值