一旦所有文件加载,是否可以触发全局完整回调?例如:
yepnope(['file1.js', 'file2.js'])
....一些HTML ......
<script>
yepnope({complete: function() { console.log('This is getting called before the above files finish loading') });
</script>
答案 0 :(得分:1)
您是否尝试过以下内容?
Modernizr.load([
{
load : ["file1.js", "file2.js"],
complete : function()
{
// do some stuff
}
} // can repeat this block as required
]);
祝你好运!