Home › Forums › CSS › jQuery ScrollTo: (need a bit of help) › Re: jQuery ScrollTo: (need a bit of help)
January 8, 2011 at 9:21 am
#67065
clokey2k
Participant
If the Header and links are 80px tall you can then scrollTo the target elements .offset() -80px. scrollTo goes moves the viewport to ‘x’px from the top of the document, so want to move 80px less (-80px).
If the header is going to change height you can get jQuery to calculate the height first.