Single page anchor navigation doesn't work
質問
I have some trouble with the following code. It will work in JSFiddle correctly, but in all of my browsers, it works terribly. It was working correctly. I haven't change anything in the code, and today it's totally not working great.
This is my JSFIDDLE: http://jsfiddle.net/E773g/13/
The navigation function should have the following tasks:
- Go to the right section that is clicked on in the navigation bar.
- Update the current class to the current item, also on scroll.
- When the user is not on the homepage but on a single page with the same navigation, only added
index.html#video
to the navigation on the single.html, it should go to that section too, that links to the homepage. - When the user refreshes the page, the hash should me removed in the URL bar.
- Minus the header that has a fixed position.
正しい解決策はありません
所属していません StackOverflow