var FromView = Backbone.View.extend({
event: {'click .clickable': 'handleClick' }, //not working while clicking on the inputbox of class clickable
render: function(){
this.$el.html('<input type="text" class="clickable" placeholder="clickable" /> <input type="text" />');
return this;
},
handleClick:function(){
console.log('button click');
}
});
var result = new FromView();
console.log(result.render().el);
$('body').append(result.render().el);
Backbone事件不起作用: - 相关主题问题:jsfiddle示例不起作用我也没有50个声誉,这就是我在这里发表评论的原因 链接: - Backbone event not working 链接: - backbone events not working