Difference between revisions of "Template:Groningen"

Line 986: Line 986:
 
$( document ).ready(function() { $("body").scrollspy({target: "#myScrollspy", offset:200}); });
 
$( document ).ready(function() { $("body").scrollspy({target: "#myScrollspy", offset:200}); });
 
// 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){
 +
    event.preventDefault();
 +
    var target_offset = $(this.hash).offset() ? $(this.hash).offset().top : 0;
 +
    //change this number to create the additional off set       
 +
    var customoffset = 100
 +
    $('html, body').animate({scrollTop:target_offset - customoffset}, 500);
 +
});
  
 
</script>
 
</script>
  
 
</html>
 
</html>

Revision as of 14:56, 28 October 2017