diff options
author | Anton Luka Šijanec <sijanecantonluka@gmail.com> | 2020-02-07 15:59:05 +0100 |
---|---|---|
committer | Anton Luka Šijanec <sijanecantonluka@gmail.com> | 2020-02-07 15:59:05 +0100 |
commit | a97c0314db49f0d446b5568a3156f61d04980f42 (patch) | |
tree | b3d9a3ff0da8c239399ca89c15f7597de8d05896 | |
parent | Merge pull request #8 from beziapp/dev (diff) | |
download | beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar.gz beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar.bz2 beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar.lz beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar.xz beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar.zst beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.zip |
-rw-r--r-- | js/login.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/js/login.js b/js/login.js index a7ab25c..f6c8c3f 100644 --- a/js/login.js +++ b/js/login.js @@ -10,6 +10,14 @@ function setupEventListeners() { $("#login-button").click(function () { login(); }); + // če kliknemo enter, klikni gumb + window.addEventListener("keyup", function(event) { + // Number 13 is the "Enter" key on the keyboard + if (event.keyCode === 13) { + event.preventDefault(); + document.getElementById("login-button").click(); + } + }); } // Handle login button click @@ -58,4 +66,4 @@ function login() { } }) -}
\ No newline at end of file +} |