Skip to content

Scroll nav to current menu item #348

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 2 commits into from
Jun 26, 2017
Merged

Conversation

imaustink
Copy link
Contributor

scroll-to-current

static/canjs.js Outdated
@@ -87,6 +87,7 @@ function init() {
buildTOC();
setNavToggleListener();
setScrollPosition();
scrollToCurrentMenuItem();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should only be run when the page first loads, not in init. As-is, the navigation will change as people click on different links, but I think we only want this behavior on the first page load.

@chasenlehara chasenlehara changed the title Scroll nav to current menu item, closes #339 Scroll nav to current menu item Jun 26, 2017
Copy link
Member

@chasenlehara chasenlehara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎊

@imaustink imaustink merged commit 7a9546d into master Jun 26, 2017
@imaustink imaustink deleted the 339-scroll-to-active-page branch June 26, 2017 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants