jquery回调 [英] jquery callback
本文介绍了jquery回调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要能够在执行完一个函数后回调函数。
I need to be able to have a callback on execution of a function after ready
jQuery(document).ready(function() {
execute function 1, only when finish
do function 2
});
有什么好办法吗?
推荐答案
文档加载完成后执行以下命令:
The following execute once the document has been loaded:
$(function(){
DoSomething();
});
function DoSomething()
{
SomethingElse(); // depends what you're doing in DoSomething()
}
function SomethingElse()
{
}
这篇关于jquery回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文