I’m trying to scan all stylesheets within DOM using following each() function
$("link").each(function(){
$.get($(this).attr('href'), function() {
// Some Code...
});
});
This code works fine but I want to get callback to know that All Stylsheets have been scanned & Run another function thereafter. Is it possible to achieve this ?
Create an array of
$.Deferredobjects:And then pass them to
.when()and use thedone()callback: