add hashchange animation

This commit is contained in:
ruanyf
2014-04-22 10:02:25 +08:00
parent 0981b07f0b
commit ad17303a03
+5 -3
View File
@@ -197,9 +197,11 @@ function router() {
Prism.highlightElement(this);
});
$('html, body').animate({
scrollTop: $('#content').offset().top
}, 200);
if(path.indexOf('README') !== -1){
$('html, body').animate({
scrollTop: $('#content').offset().top
}, 200);
}
}).fail(function() {
show_error();