我正在使用 curl
从另一个网页获取 HTML 并显示在我的一个页面上:
$("document").ready(function() {
$("#content").load("curl.php .auction_list_closed");
});
返回内容后,我想运行另一个脚本。加载内容后如何运行另一行 jQuery?
最佳答案
.load()
函数接受一个函数作为第二个参数,该函数在完成后执行。
$("document").ready(function() {
$("#content").load("curl.php .auction_list_closed", function(){
startSecondScript();
});
});
关于javascript - 在另一个 jQuery 脚本之后运行 jQuery,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4585845/