Advance to password field when Enter pressed on username, login page
This commit is contained in:
parent
051b52bd4b
commit
6bcfd0515f
2 changed files with 14 additions and 2 deletions
|
@ -1,6 +1,14 @@
|
|||
|
||||
$(function() {
|
||||
|
||||
$('#username').keydown(function(event) {
|
||||
if (event.which == 13) {
|
||||
$('#password').focus().select();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
$('form').submit(function() {
|
||||
if (! $('#username').val()) {
|
||||
with ($('#username').get(0)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue