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

Two values for scrollOffset in jQuery One Page Nav #74

Closed
blam4nz opened this issue Nov 4, 2013 · 5 comments
Closed

Two values for scrollOffset in jQuery One Page Nav #74

blam4nz opened this issue Nov 4, 2013 · 5 comments

Comments

@blam4nz
Copy link

blam4nz commented Nov 4, 2013

Hello!

I'm using jQuery One Page Nav. Script is working fine, but i have one problem. I have on the page two height of navi (default 200px, sticky 120px) When scroll is on the top height = 200px, when scroll down = 120px.

I need adjust value 'scrollOffset' to scroll position. It requires a edit script, but my JS skills are poor. I think will be good something like:

if scrollPosition = 0

{
scrollOffset = 200
}

else

{
scrollOffset = 120
}

Helpful image:

http://oi40.tinypic.com/2vbrj49.jpg

Thanks for your reply.

Regards,

@davist11
Copy link
Owner

davist11 commented Nov 4, 2013

scrollOffset is actually being removed in the next version. It's best to just use top padding and negative top margin to simulate it. Then for the first section, you can use 200, and the others 120.

@davist11 davist11 closed this as completed Nov 4, 2013
@yojance
Copy link

yojance commented May 16, 2014

I'm having a similar problem. Can you elaborate more on using top padding and negative top margin to simulate it? Im not sure to which element to add those.

Thanks.

@davist11
Copy link
Owner

@ghost
Copy link

ghost commented Jul 1, 2014

scrollOffset was good for this plugin and useful. Would you please return back to "scrollOffset " in the next version?

@davist11
Copy link
Owner

davist11 commented Jul 1, 2014

No, it is not coming back.

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