【发布时间】:2015-12-08 11:29:30
【问题描述】:
目前我有这段代码可以在每次点击时从外部 PHP 获取数据,但它显示我需要的是加载效果的一些延迟,我尝试了 jQuery fade In Slow 但它对我不起作用
$(document).ready(function() {
$("#display").click(function() {
$.ajax({ //create an ajax request to load_page.php
type: "GET",
url: "o.php",
dataType: "html", //expect html to be returned
success: function(response){
$("#responsecontainer").fadeIn('slow').html(response);
//alert(response);
}
});
});
});
【问题讨论】:
-
你可以使用setTimeout函数来延迟输出。
-
你怎么解释呢
-
如果您决定使用解决方案,请依赖动画 gif 图像。你可以考虑Chimply