Waiting on multiple asynchronous calls to complete before continuing

后端 未结 4 1317
再見小時候
再見小時候 2020-11-29 02:04

So, I have a page that loads and through jquery.get makes several requests to populate drop downs with their values.

$(function() {
    LoadCategories($(\'#C         


        
4条回答
  •  抹茶落季
    2020-11-29 02:41

    If you're on Jquery 1.5 or later, I suspect the Deferred object is your best bet: http://api.jquery.com/category/deferred-object/

    The helper method, when, is also quite nice: http://api.jquery.com/jQuery.when/

提交回复
热议问题