Backbone.js 在require js中使用mobiscroll日期选择器

Backbone.js 在require js中使用mobiscroll日期选择器,backbone.js,requirejs,mobiscroll,Backbone.js,Requirejs,Mobiscroll,我有一个主干jquery移动应用程序,我想在其中使用mobiscroll日期选择器。 我试着把它包含在头上标记中 TypeError: Cannot read property 'widget' of undefined 但我得到了这个错误 mobiscroll需要js兼容吗? 如何加载它以直接在视图中使用?确保在Jquery Mobile之后包含Mobi Pick的JS文件 我是jQuery Mobile的新手,刚刚意识到我犯了那个错误。这为我解决了这个问题。只需像包含jquery和设置对

我有一个主干jquery移动应用程序,我想在其中使用mobiscroll日期选择器。 我试着把它包含在
头上
标记中

TypeError: Cannot read property 'widget' of undefined 
但我得到了这个错误

mobiscroll需要js兼容吗?
如何加载它以直接在视图中使用?

确保在Jquery Mobile之后包含Mobi Pick的JS文件


我是jQuery Mobile的新手,刚刚意识到我犯了那个错误。这为我解决了这个问题。

只需像包含jquery和设置对jquery的依赖关系一样包含mobiscroll。我在这里发布了一个示例,说明如何将mobiscroll包含在require.js中:

require.config({
    paths: {
      jquery: 'vendor/jquery/jquery.min'
      mobiscroll: 'vendor/mobiscroll/mobiscroll..min'
    },
    shim: {
       jquery:{
          exports: "jquery"
       },
       mobiscroll:{
          deps: ['jquery'],
          exports: "mobiscroll"
       }
    }
});
require(['domReady','app', 'mobiscroll'],
   function(domReady, App){
   ...
});

你能给我们看一下相关的代码吗?