【问题标题】:yepnope / modernizr.load global complete callback?yepnope / modernizr.load 全局完成回调?
【发布时间】:2013-04-02 14:40:22
【问题描述】:

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

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

....一些 html....

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

【问题讨论】:

    标签: javascript modernizr assets yepnope


    【解决方案1】:

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

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

    祝你好运!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多