”@

Home 

2014/10/16 ¤W¤Č 12:03:02

jquery Programming Glossary: done_checker

How to confirm when more than one AJAX call has completed?

http://stackoverflow.com/questions/5932432/how-to-confirm-when-more-than-one-ajax-call-has-completed

the awesome stuff that you want to execute when both lists have loaded and finished. ... var one_done false function done_checker if one_done The other one is done so we can get on with it. do_something_wonderful one_done true #list1 .jqGrid blah blah.. one is done so we can get on with it. do_something_wonderful one_done true #list1 .jqGrid blah blah blah gridComplete done_checker #list2 .jqGrid blah blah blah gridComplete done_checker This nicely extends to more than two lists with a couple small modifications.. one_done true #list1 .jqGrid blah blah blah gridComplete done_checker #list2 .jqGrid blah blah blah gridComplete done_checker This nicely extends to more than two lists with a couple small modifications use var how_many_done 0 instead of one_done..