Commit 815cd8813b4af933d1c667876b3a8415a8db7833
1 parent
9186f728
Changed animation order
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
js/crep.js
... | ... | @@ -57,9 +57,6 @@ 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 | - }) | |
63 | 60 | mainContainer.animate({ |
64 | 61 | height: newHeight, |
65 | 62 | opacity: 1, |
... | ... | @@ -72,13 +69,16 @@ function loadDoc(location, callback) { |
72 | 69 | } |
73 | 70 | } |
74 | 71 | // Out |
72 | + $.get(location + '?c', function (data) { | |
73 | + html = data | |
74 | + events() | |
75 | + }) | |
75 | 76 | mainContainer.height(oldHeight) |
76 | 77 | mainContainer.animate({ |
77 | 78 | opacity: 0 |
78 | 79 | }, 'fast', events) |
79 | - $.get(location + '?c', function (data) { | |
80 | - html = data | |
81 | - events() | |
80 | + $(document.body).animate({ | |
81 | + scrollTop: 0 | |
82 | 82 | }) |
83 | 83 | |
84 | 84 | } | ... | ... |