Backbone事件不适用于jsFiddle

时间:2018-03-27 08:21:55

标签: javascript jquery backbone.js

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

0 个答案:

没有答案