Skip to content

Active sidebar link highlight #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from Apr 27, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: change throttle duration from 200 to 300
  • Loading branch information
ulivz authored Apr 27, 2018
commit 58f4b028b28d33a317fcd6540195576711498395
2 changes: 1 addition & 1 deletion lib/default-theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default {
},
onScroll: throttle(function () {
this.setActiveHash()
}, 200),
}, 300),
setActiveHash () {
const anchors = document.querySelectorAll('.header-anchor')
const scrollTop = Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop)
Expand Down