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 | 57 | newHeight = mainContainer.height() |
58 | 58 | mainContainer.height(oldHeight) |
59 | 59 | // Transition |
60 | + $(document.body).animate({ | |
61 | + scrollTop: 0 | |
62 | + }) | |
60 | 63 | mainContainer.animate({ |
61 | 64 | height: newHeight, |
62 | - opacity: 1 | |
65 | + opacity: 1, | |
63 | 66 | }, 'fast', function () { |
64 | 67 | mainContainer.height('auto') |
65 | 68 | dynamiseLinks(mainContainer) | ... | ... |