Home › Forums › JavaScript › Automatically scrolling past fixed navigation while linking within the same page › Re: Automatically scrolling past fixed navigation while linking within the same page
“At best, I would see if you can ask someone here to help you out with a little jQuery to scroll to the anchor and then scroll back a set number of pixels to allow for the height of the navbar. If you see what I mean.”
This is exactly what I’m trying to accomplish. The number of pixels doesn’t need to change; it would be “x” pixels from the anchor. I’d actually like for the links to set the content a ways past the navigation (rather than only accounting for the exact height of the navigation).
I realize that the fixed navigation is my problem, but I would like to keep it if at all possible.
I was experimenting with this Jquery: https://github.com/kswedberg/jquery-smooth-scroll
It sounds like it should do what I’m looking for (plus animation; I don’t need animation, but if it’s a side-effect of making it work I won’t complain), but I couldn’t figure out how to implement it.