var LoginView = View.extend({ el: "#login", events: { "submit form": "submit", }, mode: null, initialize: function(){ this.$form = this.$("form") }, show: function(){ this.$form.reset() document.body.classList.add("login") }, hide: function(){ app.curtain.hide() document.body.classList.remove("login") }, submit: function(e){ e.preventDefault() }, success: function(){ // change login in ui to logout or whatever }, })