delarge
3/27/2017 - 9:31 PM

get hash and scroll

get hash and scroll

	$(function() {
			 // Retrieves the hash from URL
			 var target = window.location.hash.substring(1);
			 // If hash length > 0 (there is actually a hash)
			 // And the #hash element exists on page
			 if(target.length > 0 && $('#'+ target).size() > 0){
		 //console.log('target: ' +  target);
		 $(function(){
				 $('html,body').animate({
						 scrollTop: $('#' + target + '').offset().top - 105
				 }, 1000);
				 return false;
		 });
	 };

	 });