Here's the code
This is model
var TodoItem = Backbone.Model.extend({
url: 'list.php',
DeleteTabItem: function (child, parent) {
jQuery.ajax({
url: 'delete.php',
});
}
});
This is view
var TodoView = Backbone.View.extend({
el: '.entry-title',
template: _.template(''),
KeyPressEvent: function () {
this.model.DeleteTabItem();
}
});
Is this correct way of sending ajax request.
Thanks in Advance