From 503cb12a30f95a7fedca333bbc2c1203b22454dd Mon Sep 17 00:00:00 2001 From: "Crom (Thibaut CHARLES)" Date: Wed, 16 May 2018 02:08:07 +0200 Subject: [PATCH] Scroll top when changing page --- js/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/main.js b/js/main.js index c4da36d..7d65cb3 100644 --- a/js/main.js +++ b/js/main.js @@ -48,6 +48,9 @@ function setPage(path){ path = "/home"; } + window.scrollTo(0, 0); + $("#article-container").empty(); + $.ajax("/pages"+path+".md") .done((res) => { $("#article-container").html(res);