Skip to content
This repository was archived by the owner on Jun 18, 2022. It is now read-only.

Offset top option #18

Open
artboard-studio opened this issue Mar 9, 2014 · 1 comment
Open

Offset top option #18

artboard-studio opened this issue Mar 9, 2014 · 1 comment

Comments

@artboard-studio
Copy link

Hi

I can not see an option to set top offset, this causes a problem when the sticky navigation is already on the top of the page.

I changed this line of code:

vartop = parseInt($(this).offset().top);

to this:

vartop = parseInt($(this).offset().top + 5);

and now it works with a 5px top offset, is there another way you suggest which is a bit cleaner than what I did here?

@alanmarcos
Copy link

I added a margin-top:1px to the div and when the plugin add the isStuck class i remove it. I think you can use translateY too.

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

1 participant