Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

data-menu-offset percentage offset #71

Open
toneffectory opened this issue Mar 14, 2015 · 3 comments
Open

data-menu-offset percentage offset #71

toneffectory opened this issue Mar 14, 2015 · 3 comments

Comments

@toneffectory
Copy link

currently, data-menu-offset can't handle percentage offsets.
I fixed it by changing line 134 to:

                //Is it a percentage offset?
                if(/p$/.test(menuOffset)) {
                    targetTop += (menuOffset.slice(0, -1) / 100) * document.documentElement.clientHeight;
                } else {
                    targetTop += +menuOffset;
                }

Can you add this to the source?

@Prinzhorn
Copy link
Owner

You have a fluid-height navigation? Or what's your use-case?

@toneffectory
Copy link
Author

the height of the top bar changes due to a skrollr action (i'm not using it
as navigation bar, but as logo bar, but still, idea is the same). See
http://www.ja-doe.nl

This site uses the skrollr menu library that I adapted.

BR
Leo

On Fri, Mar 20, 2015 at 10:09 AM, Alexander Prinzhorn <
[email protected]> wrote:

You have a fluid-height navigation? Or what's your use-case?


Reply to this email directly or view it on GitHub
#71 (comment)
.

@wuuti
Copy link

wuuti commented Jun 29, 2015

It is also not possible to give an offset other than px - e.g. em/rem - it would be great if skrollrmenu would support the possible css values here.

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