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

fix: 无法解析中文编码的hash

This commit is contained in:
ruanyf 2016-02-27 19:55:46 +08:00
parent b77c044003
commit 74118a5447

View File

@ -329,7 +329,7 @@ function router() {
if (sectionId) {
$('html, body').animate({
scrollTop: ($('#' + sectionId).offset().top)
scrollTop: ($('#' + decodeURI(sectionId)).offset().top)
}, 300);
} else {
if (location.hash !== '' || Boolean(perc)) {