本文介绍了所有的Ajax .load后,执行功能()请求完成后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个网页,有一个选项卡集。每个标签是由jQuery的加载 .load()的功能。
我要显示一个加载动画时,所有的Ajax请求完成的消失。然而,的document.ready()只给我提供了有限的成功。
我如何才能确保所有Ajax请求执行code隐藏加载动画前完成?
解决方案 .ajaxStop(句柄)
文档在这里: api.jquery/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: api.jquery/ajaxStop/
更多推荐
所有的Ajax .load后,执行功能()请求完成后
发布评论