Jquery Scrolling
- by Rich - Pixel Vector
I have implemented the following code from this page: http://tympanus.net/codrops/2010/06/02/smooth-vertical-or-horizontal-page-scrolling-with-jquery/
$(document).ready(function() {
$('ul.navone li a, ul.navtwo li a,a.toplink, a.bodylink').bind('click',function(event){
var $anchor = $(this);
$('html, body, header').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500,'easeInOutExpo');
event.preventDefault();
});
});
This all works correctly.
However, in my layout I have a fixed header div (i.e. it stays in place when the user scrolls). Therefore I need to set an offset for the scrolling script of 117 pixels.
How do I do this please?