Jquery Ajax响应延迟在回调函数之间响应

时间:2011-11-27 07:24:07

标签: jquery

我希望在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;

延迟根据需要不起作用。图像没有显示。如何解决。

1 个答案:

答案 0 :(得分:-1)