From e1cad5a33cea950e324713e26f9295185ef6b93d Mon Sep 17 00:00:00 2001 From: johan Date: Wed, 21 Dec 2022 22:58:48 +0100 Subject: [PATCH] crotte --- static/js/main.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/static/js/main.js b/static/js/main.js index 77d249f..c5e4e79 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,10 +1,11 @@ const base_url = "https://oss110metz.rezo-rm.fr/" +var page = ['#main-page', '#admin-page', '#login-page', '#demande-page']; + function show_page(id) { - $('#main-page').hide(); - $('#admin-page').hide(); - $('#login-page').hide(); - $('#demande-page').hide(); + for(i in page) { + $(page[i]).hide(); + } $(id).show(); } @@ -51,6 +52,10 @@ $(window).on("load", function() { navigator.serviceWorker.register('./js/sw.js'); } + for(i in page) { + $(page[i]).css('z-index', i); + } + /* load timer */ window.setInterval(function() { var time = $("#timer").text();