Skip to content

Instantly share code, notes, and snippets.

@lorenzoplanas
Created March 5, 2014 16:12
Show Gist options
  • Save lorenzoplanas/9370317 to your computer and use it in GitHub Desktop.
Save lorenzoplanas/9370317 to your computer and use it in GitHub Desktop.
Login function
// Handle login form submit
this.logIn = function(e) {
e.preventDefault();
$(".error", this.$el).remove();
options.user.login({
email: $("input[name='email']", this.$el).val();
password: $("input[name='password']", this.$el).val();
})
.fail(this.loginError.bind(this))
.done(this.loginSuccess.bind(this));
return this;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment