1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

add hashchange animation

This commit is contained in:
ruanyf 2014-04-22 09:55:12 +08:00
parent 76a411f37c
commit 0981b07f0b

View File

@ -196,6 +196,11 @@ function router() {
$('#content code').map(function() { $('#content code').map(function() {
Prism.highlightElement(this); Prism.highlightElement(this);
}); });
$('html, body').animate({
scrollTop: $('#content').offset().top
}, 200);
}).fail(function() { }).fail(function() {
show_error(); show_error();