Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/476.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用外部多模式JavaScript_Javascript_Jquery_Twitter Bootstrap_Meteor - Fatal编程技术网

使用外部多模式JavaScript

使用外部多模式JavaScript,javascript,jquery,twitter-bootstrap,meteor,Javascript,Jquery,Twitter Bootstrap,Meteor,我想利用meteor中的外部Github脚本来运行引导模式,这些模式取自我在应用程序上安装的meteor引导包。没有流星包。我正在使用$.getScript()jQuery函数获取源JS文件。其设置如下: Meteor.startup( function () { $.getScript("https://cdn.rawgit.com/ngzhian/multi-step-modal/master/multi-step-modal.js"); }); 不幸的是,当我包含这个时,URL中

我想利用meteor中的外部Github脚本来运行引导模式,这些模式取自我在应用程序上安装的meteor引导包。没有流星包。我正在使用$.getScript()jQuery函数获取源JS文件。其设置如下:

Meteor.startup( function () {
    $.getScript("https://cdn.rawgit.com/ngzhian/multi-step-modal/master/multi-step-modal.js");
});

不幸的是,当我包含这个时,URL中的文件会被加载,但模式功能不起作用。我相信所有的HTML都是正确的。是否有其他方法包括第三方库?库可能已损坏吗?

您如何调用模式功能?您是否希望
$.getScript
是同步的?这比我想象的要简单。我只需要使用回调函数。谢谢
Meteor.startup( function () 
{
    $.getScript("https://cdn.rawgit.com/ngzhian/multi-step-modal/master/multi-step-modal.js",function()
    {
        // Here the script is loaded and you can use it's functions
    });
});