Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Need the ability to set an offset for logic determining where #165

Closed
louiswalch opened this issue Sep 2, 2017 · 3 comments
Closed

Need the ability to set an offset for logic determining where #165

louiswalch opened this issue Sep 2, 2017 · 3 comments

Comments

@louiswalch
Copy link

Need the ability to set an offset for scrollTo method.

I have a fixed nav which locks to the top of the viewport. With the current way the scrollTo method works the top part of active section is covered by this nav.

I've seen some "CSS Only" solutions for this problem in the Issue Archive, but this would is not sufficient. CSS impacts the page's layout, and I don't want a bunch of extra padding above each of my sections in order for the scrolling to work correctly.

It seems like allowing for an option to be passed in when initializing the plugin would be possible. Any chance you can support this?

Thank you.

@davist11
Copy link
Owner

davist11 commented Sep 5, 2017

The CSS solution described in the documentation has zero impact on the design.

@louiswalch
Copy link
Author

louiswalch commented Sep 6, 2017

It requires extra space/padding above the section to offset the amount of the header. That impacts the design of a page.

@davist11
Copy link
Owner

davist11 commented Sep 6, 2017

That's not an accurate statement as you can see from the demo: http://davist11.github.io/jQuery-One-Page-Nav/top.html

@davist11 davist11 closed this as completed Sep 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants