19 lines
380 B
JavaScript
19 lines
380 B
JavaScript
|
function authenticate() {
|
||
|
if (userDb[$('#inp_user').val()] == $('#inp_passw').val()) {
|
||
|
sendAuth({thisUser: userDb[$('#inp_user').val()]}, goNext, errorAnimation);
|
||
|
} else {
|
||
|
errorAnimation();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
$(document).ready(function(){
|
||
|
$('#submit').click(function(){
|
||
|
authenticate();
|
||
|
})
|
||
|
$(document).on('keypress',function(e) {
|
||
|
if(e.which == 13) {
|
||
|
authenticate();
|
||
|
}
|
||
|
});
|
||
|
})
|