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

scrollOffset? #125

Closed
bezenson opened this issue Dec 3, 2014 · 4 comments
Closed

scrollOffset? #125

bezenson opened this issue Dec 3, 2014 · 4 comments

Comments

@bezenson
Copy link

bezenson commented Dec 3, 2014

In older version we have this parameter. What about new version of plugin?

@davist11
Copy link
Owner

davist11 commented Dec 3, 2014

It was removed in favor of a CSS only solution:

http://davist11.github.io/jQuery-One-Page-Nav/top.html

@davist11 davist11 closed this as completed Dec 3, 2014
@bezenson
Copy link
Author

bezenson commented Dec 3, 2014

And how to use this solution in this case: http://demo.meethemes.com/creatorica/theme/ ? How to set offset with CSS here?

@davist11
Copy link
Owner

davist11 commented Dec 3, 2014

Use negative margin and padding for each section like the demo.

@Walidbeno
Copy link

Hi Guys, we have fixed offset issues in the current version

This is the fix for version 3.0.0

Open Jquery.nav.js and add this to the plugin prototype ( line 44 )

scrollOffset: 0,

screen shot 2014-12-30 at 05 12 04

and then scroll to line ( 203 ) and edit this line

var offset = $(target).offset().top-this.config.scrollOffset;

screen shot 2014-12-30 at 05 13 30

You should then use > scrollOffset: X, > in your options

Enjoy the fix guys and Happy new year for you and for the developper 🌟

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

3 participants