我希望在ajax回调的响应之间延迟5秒。
checkSucess = function() {
// Jquery Ajax with url,params and response
doPost('sucess.php',
'first=' + first,
function(response) {
var status = checkSucess(response,'X');
// I want to delay 5 seconds with this code before next checkSucess() function is called.
$('#SlideShow').html('<img id="SlideShows" src="images/loadingAnimation.gif">').delay(5000);
$('#button'+response).val("O");
$('#SlideShow').empty();
// End block.
var status = checkSucess(response,'O');
});
return response;
延迟根据需要不起作用。图像没有显示。如何解决。