Backbone.js 在requirejs中使用同位素插件
我使用以下说明添加了同位素插件: 这是我的密码:Backbone.js 在requirejs中使用同位素插件,backbone.js,marionette,require,jquery-isotope,Backbone.js,Marionette,Require,Jquery Isotope,我使用以下说明添加了同位素插件: 这是我的密码: this.social = new Isotope('#latest-news', { itemSelector: '.social-item', layoutMode: 'fitRows', sortBy: 'text', getSortData: { 'text': '.text' } }); 然后我尝试稍后插入元素,如下所示: that.social( 'insert', elemen
this.social = new Isotope('#latest-news', {
itemSelector: '.social-item',
layoutMode: 'fitRows',
sortBy: 'text',
getSortData: {
'text': '.text'
}
});
然后我尝试稍后插入元素,如下所示:
that.social( 'insert', elements );
但是(在insert函数上)出现以下错误:
如果我执行console.log(this.social)操作,它会返回一个同位素对象
我如何调用“insert”函数,或者任何函数?否则我会错在哪里?对源代码进行了一段时间的检查,当使用requirejs时,插入方法变成: that.social.insert(元素)强> 基本上使用方法的vanilla JS版本
Uncaught TypeError: undefined is not a function