1

加载所有文件后是否可以触发全局完成回调?前任:

yepnope(['file1.js', 'file2.js'])

....一些 html....

<script>
    yepnope({complete: function() { console.log('This is getting called before the above files finish loading') });
</script>
4

1 回答 1

1

您是否尝试过类似以下的方法?

Modernizr.load([

  {
  load : ["file1.js", "file2.js"],
  complete : function()
  {
  // do some stuff
  }
  } // can repeat this block as required

]);

祝你好运!

于 2013-04-03T14:56:07.997 回答