Is it possible to fire a global complete callback once ALL files have loaded? Ex:
yepnope(['file1.js', 'file2.js'])
....some html....
<script>
yepnope({complete: function() { console.log('This is getting called before the above files finish loading') });
</script>
Have you tried something like the following?
Modernizr.load([
{
load : ["file1.js", "file2.js"],
complete : function()
{
// do some stuff
}
} // can repeat this block as required
]);
Good luck!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.