mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-25 03:02:21 +00:00
fix: 无法解析中文编码的hash
This commit is contained in:
parent
b77c044003
commit
74118a5447
@ -329,7 +329,7 @@ function router() {
|
|||||||
|
|
||||||
if (sectionId) {
|
if (sectionId) {
|
||||||
$('html, body').animate({
|
$('html, body').animate({
|
||||||
scrollTop: ($('#' + sectionId).offset().top)
|
scrollTop: ($('#' + decodeURI(sectionId)).offset().top)
|
||||||
}, 300);
|
}, 300);
|
||||||
} else {
|
} else {
|
||||||
if (location.hash !== '' || Boolean(perc)) {
|
if (location.hash !== '' || Boolean(perc)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user