jquery-在多个.load之后执行[x]

Once all three loads are complete...

$("#sidebar a").live("click", function(e){ 
    $(this).addClass("selected loading");
    $("#conceptual").load(conceptualUrl, null, function(){ $(this).removeClass('loading').show("fast");  });
    $("#development").load(developmentUrl, null, function(){ $(this).removeClass('loading').show("fast"); });
    $("#operational").load(operationalUrl, null, function(){ $(this).removeClass('loading').show("fast"); });
});

How can I remove the loading class from the link once ALL THREE loads are complete?

$("#sidebar a.loading").removeClass("loading");

Thanks!

查看全部
weixin_33738982
?Briella
2009/11/06 07:00
  • ajax
  • jquery
  • 点赞
  • 收藏
  • 回答
    私信

6个回复