GitHub 博客园 Nanakon

♫【Backbone】this

Backbone.js Event Binding

MyView = Backbone.View.extend({
    events: {
        'click .item': 'handleClick'
    },

    handleClick: function(e) {
        this; // The view instance
        e.target; // The element that was clicked 
        e.currentTarget; // The element that was bound by the click event
    }
});

 

posted on 2014-03-07 20:34  jzm17173  阅读(227)  评论(0编辑  收藏  举报

导航

轻音