Line 985: | Line 985: | ||
<script> | <script> | ||
// Add scrollspy to document | // Add scrollspy to document | ||
− | $( document ).ready(function() { $("body").scrollspy({target: "#myScrollspy", offset: | + | $( document ).ready(function() { $("body").scrollspy({target: "#myScrollspy", offset:100}); }); |
// Add smooth scrolling on all links inside the navbar | // Add smooth scrolling on all links inside the navbar | ||
$('body').on('click','a[href*="#snav"]',function(event){ | $('body').on('click','a[href*="#snav"]',function(event){ | ||
Line 991: | Line 991: | ||
var target_offset = $(this.hash).offset() ? $(this.hash).offset().top : 0; | var target_offset = $(this.hash).offset() ? $(this.hash).offset().top : 0; | ||
//change this number to create the additional off set | //change this number to create the additional off set | ||
− | var customoffset = | + | var customoffset = 75 |
$('html, body').animate({scrollTop:target_offset - customoffset}, 500); | $('html, body').animate({scrollTop:target_offset - customoffset}, 500); | ||
}); | }); |
Revision as of 12:50, 30 October 2017