DM.Backbone.View.feedback = Backbone.View.extend( {
initialize: function (){
this.render( this.model.get( 'data' ) || [] );
},
render: function ( param ){
if ( $( '.problem_report_reply' ).length > 0 ) {
_.bind( this.mail_to, this );
$( '.problem_report_reply' ).off().on( 'click', this.mail_to )
}
},
mail_to: function (){
console.log( 'this', this )
} );
Here my code of Backbone.View. I have problem with binding method to DOM element, console.log show this like a DOM element which i clicked. I use undescore method _.bind to correct binding this, what a problem?