I am using the jQuery scrollTo plugin as you can see on the page which I'm building http://portfolio.tomvervoort.net/
Because of the 300px fixed header the content moves under the header. You can see this clearly when you click the about button in the menu. Is it possible to add an 300px offset to the scrollTo script so everything stays positioned under the header/menu?
You can use the "offset" setting as described on:
http://flesler.blogspot.com.ar/2007/10/jqueryscrollto.html
Something like:
$.scrollTo(newLoc, o.scrollSpeed, {
// ...
offset:-300
});
You could try changing this line in jquery.nav.js:
$.scrollTo(newLoc, o.scrollSpeed, {
to
$.scrollTo($('newLoc').offset().top-300, o.scrollSpeed, {
So instead of telling scrollto
to scroll to exactly that element, you get the position of the element yourself and subtract 300
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With