jQuery API jQuery API 中英文对照版
ajaxStop(callback)
ajaxStop(callback)

绑定一个Ajax请求全部结束时执行的函数。

返回值:jQuery

参数:

  • callback (Function): 执行的函数。

示例:

当AJAX请求停止时隐藏Loading信息。

$("#loading").ajaxStop(
  function(){
    $(this).hide();
  }
); 
 
ajaxStop( callback )

Attach a function to be executed whenever all AJAX requests have ended.

Return value: jQuery
Parameters:

  • callback (Function): The function to execute.

Example:

Hide a loading message after all the AJAX requests have stopped.

 $("#loading").ajaxStop(
  function(){
      $(this).hide();
   }
 );  
相关链接
asp之家 | jQuery官方网站 | jQuery中文网 | 电子书作者网站 | 电子书作者blog