Skip to content

Commit

Permalink
Closes #2
Browse files Browse the repository at this point in the history
Submit word w/ enter key
  • Loading branch information
cktang88 committed May 25, 2017
1 parent ce01fd6 commit d9f0550
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion public/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
this.word = '';
this.picArray = [];


//submit word on enter key
$('#wordinput').keypress(function(e) {
//if enter key pressed
if (e.which === 10 || e.which === 13) {
submitWord();
}
});

//submit button
var submitWord = function() {
Expand Down

0 comments on commit d9f0550

Please sign in to comment.