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

fix: 优化链接中有双层锚点时最后章页面加载按钮判断逻辑

This commit is contained in:
xuexb 2016-04-03 00:47:15 +08:00
parent 797ee7c38a
commit 072df734f1

View File

@ -373,14 +373,13 @@ function router() {
}
}
}
if (location.hash === '' || location.hash === menu[0]) {
if (location.hash === '' || '#' + getHash().nav === menu[0]) {
$('#pageup').css('display', 'none');
} else {
$('#pageup').css('display', 'inline-block');
}
if (location.hash === menu[(menu.length - 1)]) {
if ('#' + getHash().nav === menu[(menu.length - 1)]) {
$('#pagedown').css('display', 'none');
} else {
$('#pagedown').css('display', 'inline-block');