Skip to content

Commit

Permalink
Binding to submit entry as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Tivoli committed Oct 26, 2011
1 parent 00a5a3f commit 5778c69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion jquery.attest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/jquery.attest.coffee
Expand Up @@ -18,8 +18,9 @@ class attest
@fields = @form.find(@options.nodes).not(@options.ignored)
@submit = @form.find(@options.submit)
@_bindings()
@form.live 'keypress submit', (e) =>
@submit.bind 'click', (e) =>
return false if @validate().length
@form.bind 'keypress', (e) =>
return false if e.which is 13 and @validate().length

_bindings: ->
Expand Down

0 comments on commit 5778c69

Please sign in to comment.