Skip to content

Commit

Permalink
Game can start with ENTER.
Browse files Browse the repository at this point in the history
  • Loading branch information
arfurlaneto committed Sep 2, 2015
1 parent f8c062c commit eb3435c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 class="i18n" data-i18n="labels.appName"></h1>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon i18n" data-i18n="labels.runFor"></span>
<input type="number" class="form-control" id="timer_length" name="timer length" min="1" max="60" value="5" />
<input type="number" class="form-control" id="timer_length" min="1" max="60" value="5" />
<span class="input-group-addon i18n" data-i18n="labels.minutes">.</span>
</div>
</div>
Expand Down Expand Up @@ -91,7 +91,7 @@ <h1 class="i18n" data-i18n="labels.appName"></h1>
</div>
</div>
<div class="form-group">
<button type="button" class="btn btn-primary col-xs-12" id="start" style="display: none">
<button type="submit" class="btn btn-primary col-xs-12" id="start" style="display: none">
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
<span class="i18n" data-i18n="labels.start"></span>
</button>
Expand Down
3 changes: 2 additions & 1 deletion js/mathtrainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@
}
});

$('#start').click(function () {
$("form#options").submit(function (e) {
e.preventDefault();
var hasValidOptions = trainer.options.initialize();
if (hasValidOptions) {
trainer.question.createNew();
Expand Down

0 comments on commit eb3435c

Please sign in to comment.