所有的Ajax .load后,执行功能()请求完成后 [英] Execute function after all ajax .load() requests are finished
本文介绍了所有的Ajax .load后,执行功能()请求完成后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个网页,有一个选项卡集。每个标签是由jQuery的加载 .load()
的功能。
我要显示一个加载动画时,所有的Ajax请求完成的消失。然而,的document.ready()
只给我提供了有限的成功。
如何才能确保所有Ajax请求执行code隐藏加载动画前完成?
解决方案
.ajaxStop(句柄)
文档在这里: http://api.jquery.com/ajaxStop/
I have a page that has a tab set. Each of the tabs is loaded by the jQuery .load()
function.
I want to display a loading animation that disappears when all of the ajax requests are finished. However, document.ready()
has only provided me with limited success.
How can I ensure that all ajax requests are completed before executing the code to hide the loading animation?
解决方案
.ajaxStop(handler)
Documentation here: http://api.jquery.com/ajaxStop/
这篇关于所有的Ajax .load后,执行功能()请求完成后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文