diff options
Diffstat (limited to 'public/js/lib/views/lobby')
| -rw-r--r-- | public/js/lib/views/lobby/lobby.js (renamed from public/js/lib/views/lobby/index.js) | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/public/js/lib/views/lobby/index.js b/public/js/lib/views/lobby/lobby.js index 0306445..6821436 100644 --- a/public/js/lib/views/lobby/index.js +++ b/public/js/lib/views/lobby/lobby.js @@ -1,17 +1,23 @@ var LobbyView = View.extend({ + el: "#lobby", + events: { - "form submit": "join" + "submit form": "join" }, initialize: function(){ this.$createRoom = this.$("#create-room") }, - join: function(){ + join: function(e){ + console.log("hwat") + e && e.preventDefault() var name = this.$createRoom.sanitizeName() + console.log("name") + if (! name) { return } window.location.href = "/v/" + name } -})
\ No newline at end of file +}) |
