mirror of
https://github.com/wassname/Mostly-Harmless.git
synced 2026-07-22 12:30:11 +08:00
fixed page not scrolling to top when navigating via hashtag.
This commit is contained in:
@@ -28,6 +28,7 @@ function navigate(navTo, speed, navFrom) {
|
||||
$(document).ready(function() {
|
||||
$('div.article').hide(0);
|
||||
if(window.location.hash.substr(1)) {
|
||||
window.setTimeout(window.scrollTo, 850, 0, 0);
|
||||
navigate(window.location.hash.substr(1),400);
|
||||
} else {
|
||||
window.location.hash = showOnLoad;
|
||||
|
||||
Reference in New Issue
Block a user