Hi guys,
I am using some anchor links in the website menu (kontakt, talare, program) and it´s working fine at the frontpage. But if i am standing in a subpage, the “jump” end up in the wrong spot.
The #kontakt allows you to navigate to an element that uses the same ID on that page. As your sub-page has no such element, nothing will happen.
Therefore, you will need to replace #kontakt in the Menu URL option via WordPress Admin Dashboard > Appearance > Menu with http://what-works.se/#kontakt. You will need to do this for all menus that navigate to an element on your homepage.
So the problem here is that our smooth scroll function has a default offset value of 100. This is the reason why when you smooth scroll to that section, there is an extra space on top of your padding/margin. Unfortunately, when you visit that link from another page, or when you visit it manually with the hashtag, the browser takes over and we lose control, i.e., the offset won’t take place.