我有很多使用模板的视图。视图渲染完美地工作,现在进入我的路由器,我正在寻找一种在所有视图渲染时触发事件的方法!我使用了像 LAB.js 这样的 js 加载器,但没有任何效果!
在所有渲染之后,我将事件输入到萤火虫控制台中,它的工作!
我可以如何以及在此处放置我的事件,以便在所有视图呈现时触发它!
**我的活动:**
$('div[id ^="solfg_"]').mobilyblocks();
**路由器:**
(function () {
window.AppRouter = Backbone.Router.extend({
routes: {
"" : "init"
},
init: function(){
this.solfsmodel = new Solfs();
this.solfsmodel.fetch();
this.solfsView = new SolfsView({model: this.solfsmodel});
}
});
var app_router = new AppRouter;
Backbone.history.start();
}(jQuery));
谢谢
更新: 同样的问题