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

Hash navigation on page load ignores data-menu-offset #19

Open
kylelondonuk opened this issue Oct 12, 2013 · 2 comments
Open

Hash navigation on page load ignores data-menu-offset #19

kylelondonuk opened this issue Oct 12, 2013 · 2 comments

Comments

@kylelondonuk
Copy link

Hi,

Isee 3 open issues all discussing errors with hash navigation on page load, but they don't seem to specifically site the data-menu-offset being ignored on the initial scroll when you arrive at a page with a hash in the navigation.

I have a website using skrollr with a 60px fixed header, so use data-menu-offset="-60" on each of my content panels. My navigation links work just fine when clicking after the page has loaded, but if you arrive at the page with a hash in the URL, skrollr kicks in and scrolls to the top of that DIV, but ignores the offset. Seems like maybe it's initiating too early or just ignoring that property on init()..

Apologies if this has been covered already - I scrolled through open and closed issues and couldn't find it described quite like this.

Cheers

@kylelondonuk
Copy link
Author

(It occurred to me that the error being thrown by skrollr that's described in Issues #8 and #12 may be responsible for this problem, and that actually what I'm seeing is just the default browser behaviour (i.e. the hash in the URL leads the page to knock down to the DIV with that ID, obviously ignoring the offset).)

@Prinzhorn
Copy link
Owner

Please try version 0.1.6. It should work on mobile as well.

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