I have seperated HTML files in my project which I load into a main page.
$("#tabs-1").load("tab1.html");
$("#tabs-2").load("tab2.html");
$("#tabs-3").load("tab3.html");
This function is asynchronous so I need a callback statement after these three fragments have been loaded. I only know how to use a callback for 1 function, not all 3. Here is the workaround I had in mind, but I'm sure there must be a better way.
$("#tabs-1").load("tab1.html", function(){
$("#tabs-2").load("tab2.html", function(){
$("#tabs-3").load("tab3.html", function(){
doCallback();
});
});
});