Skip to content
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

Add js to scroll nav so that the link to the current page is shown #60

Merged
merged 2 commits into from
May 21, 2019

Conversation

toddq
Copy link

@toddq toddq commented Apr 4, 2019

When the nav menu is long and you click a link towards the bottom, it's annoying that it scrolls back to the top on page load and the clicked link is no longer visible on the page. This simply scrolls the nav link for the page currently being viewed is visible on page load.

It also contains a fix for the nav collapse script only matching on 'starts with', which in our project resulted in several items sometimes being opened. For example we have a 'Session' class and a 'SessionManager' class, so 'starts with' Session matches both. New logic matches exact name. Let me know if this should be split out to a separate pull request.

Todd Quessenberry added 2 commits April 4, 2019 13:09

Verified

This commit was signed with the committer’s verified signature. The key has expired.
ewfian Fan

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Matching on 'starts with' can result in multiple matches expanding inappropriately.
@@ -1,16 +1,14 @@
function hideAllButCurrent(){
//by default all submenut items are hidden
Copy link
Author

Choose a reason for hiding this comment

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

Like the comment says, they're already hidden by the template, so there's no reason to do this.

@ar2rsawseen ar2rsawseen merged commit c8e1fa8 into clenemt:master May 21, 2019
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.

None yet

2 participants