jquery - How to wait for multiple ajax requests, when the list grows as requests come in? -


i know "$.when.apply($, list)", works when have set list. in case, i'm getting tree of urls on ajax, starting root url point 0 or more other urls get, can each point 0 more other urls, etc.

for example, suppose "url1", returns ["url2", "url3"], means want urls, , on. first ajax call url1 complete before can start ajax calls url2 , url3. writing function retrieve whole tree , store data easy enough, way trigger action when all these ajax calls done?


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -