1. Use this code from the Devin Sturgeon comment on Smooth Scrolling Posts. Plus I added a little subtraction to make up for your sticky headline. Tune in to sympathy.
// your functions go here $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') || location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top - 181 }, 1000); return false; } } });
2. Move all your bindings to the actual item that you want to scroll.
(ref: http://css-tricks.com/snippets/jquery/smooth-scrolling/#comment-197181 )
rocky
source share