Commit 9186f72811342143d531d8d4c9c9bad3c5b0d51d
1 parent
2b08a86d
Auto scroll top
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
js/crep.js
@@ -57,9 +57,12 @@ function loadDoc(location, callback) { | @@ -57,9 +57,12 @@ function loadDoc(location, callback) { | ||
57 | newHeight = mainContainer.height() | 57 | newHeight = mainContainer.height() |
58 | mainContainer.height(oldHeight) | 58 | mainContainer.height(oldHeight) |
59 | // Transition | 59 | // Transition |
60 | + $(document.body).animate({ | ||
61 | + scrollTop: 0 | ||
62 | + }) | ||
60 | mainContainer.animate({ | 63 | mainContainer.animate({ |
61 | height: newHeight, | 64 | height: newHeight, |
62 | - opacity: 1 | 65 | + opacity: 1, |
63 | }, 'fast', function () { | 66 | }, 'fast', function () { |
64 | mainContainer.height('auto') | 67 | mainContainer.height('auto') |
65 | dynamiseLinks(mainContainer) | 68 | dynamiseLinks(mainContainer) |