Browse Source

anchor link scroll

windhamdavid 5 years ago
parent
commit
95af75d6f1
1 changed files with 8 additions and 0 deletions
  1. 8 0
      js/init.js

+ 8 - 0
js/init.js

@@ -10,6 +10,14 @@ $(document).ready(function() {
 			nav_img.attr("src","img/biotherm-black-dots.png");
 		}
 	});
+	
+	if (window.location.hash) {
+	var hash = window.location.hash;
+		$('html, body').animate({
+			scrollTop :  $(hash).offset().top
+		}, 500);
+	};
+	
 });
 
 $(document).on('click', '[data-toggle="lightbox"]', function(event) {