0
這個ajax調用使IE11和css動畫凍結。 Mozilla和Chrome都很好。這不僅是有問題的,我只是舉例說明。以下是我到目前爲止嘗試過的幾種解決方法:JQuery Ajax掛起IE11
- 禁用緩存。我從服務器禁用它,
-Tried setTimeout的伎倆,
-Removed嵌套函數。事件只是.html()方法不能單獨工作。
$.ajax({type: 'POST',
url: "accordion.php?cat="+aid,
async: true,
success: function (html) {
$("#accordion").animate({ right: "140%"},500, function() {
$(this).css("right","-25%", $(this).hide(1, function() {
$(this).html(html).show(1, function() {
$(this).animate({right: "100%"},1000),$ajaxloading.fadeOut("slow")})}));});}})
在'success'函數中的函數是否凍結瀏覽器,如果你把它們放在AJAX之外(使用靜態'html'字符串)? – alalp
其實這是一個聰明的建議,但它不會是一樣的。這是一個發送變量的php ajax。它讓我很好奇,如果它在PHP寫作過程中掛起。但是,無論如何...我會嘗試使用其他一些html字符串,並讓您知道結果。 – Litestone
'function myAjax(html){$(「#accordion」)。animate({right:「140%」},500,function(){$(this).css(「right」,「 - 25%」, $(this).hide(1,function(){$(this).html(html).show(1,function(){$(this).animate({right:「100%」},1000) $ loading.fadeOut(「slow」)})}));});} }}); htm:「 Do Jo 」; myAjax(htm); ' This Works supersmooth。我嘗試了一張大桌子,沒有問題。我在accordion.php中鏈接了一些其他的.js文件。也許這是因爲IE試圖初始化這些腳本。 –
Litestone