:
, template_loader, - . right_btn , .
var ForgotPasswordView = Backbone.View.extend({
el: "#template_loader",
initialize: function () {
console.log('Forgot Password View Initialized');
},
render: function () {
blockPage();
var that = this;
$.get(App.baseUrl + 'templates/forgot-password-view.html', function (data) {
template = _.template(data, { });
that.$el.html(template);
unblockPage();
}, 'html');
},
events:{
'click .right_btn':'forgotPasswordSubmit',
},
forgotPasswordSubmit: function(e){
alert($(".forgot_password_email").val());
e.preventDefault();
}
});
, . , . , , -:
, el. , el .
, - this el . jquery, , . , ... .!
new ForgotPasswordView ({
el:'#master_template'
});