do previous page fadeout and not immediately hide

This commit is contained in:
HorizonCode 2022-10-17 12:58:56 +02:00
parent 7785ebec92
commit e6ccec3e93

View File

@ -120,12 +120,14 @@ window.addEventListener('DOMContentLoaded', () => {
function changePage(page) { function changePage(page) {
switch (page) { switch (page) {
case "login": case "login":
$("#launch-page").hide(); $("#launch-page").fadeOut(50, "swing", () => {
$("#login-page").fadeIn(350); $("#login-page").fadeIn(350);
});
break; break;
case "launch": case "launch":
$("#login-page").hide(); $("#login-page").fadeOut(50, "swing", () => {
$("#launch-page").fadeIn(350); $("#launch-page").fadeIn(350);
});
break; break;
} }
} }