So I'm working on a website that has a fixed navbar:
http://abnetworksa.rewind9.com/servicios/infraestructura/
Besides the fixed navbar, there's a "sticky" sidebar. This sidebar links are anchors that redirect the user to specific content in the same page.
Everything seems to work properly. However, when clicking one of those sidebar links, the targeted content title is hidden under the fixed navbar. Is there a way I could set up and offset for this sidebar links?
I tried
var offset = 380;
$('.sidebar-nav li a').click(function(event) {
event.preventDefault();
$($(this).attr('href'))[0].scrollIntoView();
scrollBy(0, +offset);
});
But it does not work seems it seems to start doing some weird calculations from bottom to top.
Any help?
Thanks a lot!