Difference between revisions of "Team:TUDelft/Header"

Line 748: Line 748:
 
                     var hash = this.hash;
 
                     var hash = this.hash;
 
                         // Add hash (#) to URL when done scrolling (default click behavior)
 
                         // Add hash (#) to URL when done scrolling (default click behavior)
                         window.location.assign();
+
                         window.location.hash = hash;
 
                     // Using jQuery's animate() method to add smooth page scroll
 
                     // Using jQuery's animate() method to add smooth page scroll
                     // The optional number (200) specifies the number of milliseconds it takes to scroll to the specified area
+
                     // The optional number (100) specifies the number of milliseconds it takes to scroll to the specified area
 
                     $('html, body').animate({
 
                     $('html, body').animate({
 
                         scrollTop: $(hash).offset() .top -100
 
                         scrollTop: $(hash).offset() .top -100
                     }, 100, function(){
+
                     }, 200, function(){
  
 
                     });
 
                     });

Revision as of 09:25, 19 October 2019