Scroll top when changing page
This commit is contained in:
parent
bdd08a7ffd
commit
503cb12a30
1 changed files with 3 additions and 0 deletions
|
@ -48,6 +48,9 @@ function setPage(path){
|
||||||
path = "/home";
|
path = "/home";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
$("#article-container").empty();
|
||||||
|
|
||||||
$.ajax("/pages"+path+".md")
|
$.ajax("/pages"+path+".md")
|
||||||
.done((res) => {
|
.done((res) => {
|
||||||
$("#article-container").html(res);
|
$("#article-container").html(res);
|
||||||
|
|
Loading…
Add table
Reference in a new issue