I have a website www.tinytoepress.com that uses #hash tag navigation using jQuery and the jquery-bbq plugin. It works great, except sometimes it makes the page jump below the title, as if it were going to the actual <a name...> tag. But there are no such tags.
For example, if Chrome is on OS X, if I visit the homepage:
http://www.tinytoepress.com/
and then click the "Save" link in the upper left corner, I go to:
http://www.tinytoepress.com/#store
However, I scroll below the header, which is undesirable. I would like to stay upstairs.
If I scroll up and press "O", I will go to the "About" page, but again scroll down the title. However, if I now scroll up and click โSaveโ again, I go to the โShopโ without scrolling down, which is desirable.
I use the simple .show() and .hide() methods to control the visibility of div that are set with navigation clicks.
Any ideas on how to prevent a page jump?
jquery navigation jquery-bbq
mrjf
source share