Scroll top when changing page

This commit is contained in:
Crom (Thibaut CHARLES) 2018-05-16 02:08:07 +02:00
parent bdd08a7ffd
commit 503cb12a30
Signed by: tcharles
GPG Key ID: 45A3D5F880B9E6D0

View File

@ -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);