Skip to content

Commit

Permalink
fix: 优化链接中有双层锚点时最后章页面加载按钮判断逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
xuexb committed Apr 2, 2016
1 parent 797ee7c commit 072df73
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/ditto.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 072df73

Please sign in to comment.