I\'m still trying to wrap my head around deferred and what not, so with this in mind I have a question on how to do the following.
My team and I have 3 separate
I use next code for this case:
$.when(
$.get('templates/navbar.tmpl.html', function(data) {
$('#navbar').html(data);
}),
$.get('templates/footer.tmpl.html', function(data) {
$('#footer').html(data);
}),
$.Deferred(function(deferred) {
$(deferred.resolve);
})
).done(function() {
$.getScript("js/tools/jquery.min.js");
});
To my mind it looks more structured and pretty nice than previous implementations.