mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
fix: 优化链接中有双层锚点时最后章页面加载按钮判断逻辑
This commit is contained in:
+2
-3
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user