jQuery API | jQuery API 中英文对照版 |
ajaxStart(callback) |
ajaxStart(callback)
绑定一个当AJAX请求开始并且还没有开始运行时执行的函数 返回值:jQuery 参数:
示例: 当Ajax请求开始(并没有开始活动)显示一个loading信息。 ("#loading").ajaxStart(function(){ $(this).show(); }); Attach a function to be executed whenever an AJAX request begins and there is none already active. Return value: jQuery
Example: Show a loading message whenever an AJAX request starts (and none is already active). $("#loading").ajaxStart(function(){ $(this).show(); }); |