Jquery tabs added to code makes auto scroll (vertical) scroll past anchors

I have set up a autoscroll page using the css-tricks code for smooth scrolling: http://css-tricks.com/snippets/jquery/smooth-scrolling/

It has always worked great, and I have just added jquery tabs to some of the content which now makes it scroll past the main anchors that are below the tabs.

Code here: http://jsfiddle.net/qR5bm/

Why is this happening and what can I do to fix it?

Answers


I believe the issue is that after you apply the scrolling you are hiding a bunch of items. For some reason it seems to be interfering with the calculations.

If you move the smooth scrolling code below the tab functions, it will work fine:

Demo: http://jsfiddle.net/lucuma/qR5bm/1/


Need Your Help

Spring 4 @Value where property default is a java system property

java spring

In Spring 4, using the @Value annotation, what is the right way to specify a system property as a default if a specified property does not exists?