1
我無法獲得twitter bootstrap的模式以與backbone.js一起使用。如何獲取Twitter Bootstrap Twipsy與Backbone.js一起使用
骨幹視圖正常工作。
window.CaseView = Backbone.View.extend({
tagName: "tr",
render: function() {
var that = this;
var tmpl = $("#tmplCase").render(that.model.toJSON());
$(that.el).html(tmpl);
return this;
},
events: {
"hover #pp-12444" : "open"
},
open: function() {
//console.dir(this);
$('#pp-12444').twipsy('show');
},
...
twitter bootstrap js模塊已正確加載。
感謝,我從來沒有初始化它。我在最後使用了以下內容:'open:function(){ \t \t var that = this; \t \t var id ='#'+ that.el.children [3] .children [0] .id; \t \t $(ID).twipsy({觸發: 「手動」, 位置: 「右」, 偏移:10, HTML:真實, 標題:函數(){返回that.model.get(「消息「);}, }); \t \t $(id).twipsy(「show」); \t \t},' – Joe 2012-01-15 17:23:21