Difference between revisions of "Template:Groningen"

Line 994: Line 994:
 
// Add smooth scrolling on all links inside the navbar
 
// Add smooth scrolling on all links inside the navbar
  
var animateScroll = function(target, offset) {
+
var animateScroll = function(target, offset) {
 
     var is = $(document).scrollTop();
 
     var is = $(document).scrollTop();
 
     var must = parseInt($(target).offset().top) + offset;
 
     var must = parseInt($(target).offset().top) + offset;
 
     if (is < must) {
 
     if (is < must) {
 
         $(document).scrollTop(is+(must/200));
 
         $(document).scrollTop(is+(must/200));
 +
        setTimeout(function() {animateScroll(target, offset);}, 10);
 +
    } else if (is > must) {
 +
        $(document).scrollTop(is-(must/200));
 
         setTimeout(function() {animateScroll(target, offset);}, 10);
 
         setTimeout(function() {animateScroll(target, offset);}, 10);
 
     }
 
     }
 
}
 
}
 +
  
 
var jump=function(e)
 
var jump=function(e)

Revision as of 21:10, 31 October 2017