mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 02:02:21 +00:00
fix: 优化链接中有双层锚点时最后章页面加载按钮判断逻辑
This commit is contained in:
parent
797ee7c38a
commit
072df734f1
@ -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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user