I am currently trying to implement the scrollTo function, but I am encountering an issue where when the link in the navbar is clicked, it scrolls to the correct div but goes a little too far. I suspect that this has something to do with the fixed navbar at the top. How can I apply an offset to adjust this behavior?
<script src="js/jquery.scrollTo.js"></script>
<script src="js/jquery.nav.js"></script>
<script>
$(document).ready(function() {
$('#nav').onePageNav({
begin: function() {
console.log('start')
},
end: function() {
console.log('stop')
}
});
$('.do').click(function(e) {
$('#section-4').append('<p></p>');
e.preventDefault();
});
});
</script>