Smooth Scroll In JS and jQuery

Smooth Scroll In JS and jQuery
jQuery(document).ready(function () {
  jQuery('.processreachfind').click(function(e){
      e.preventDefault();
      jQuery('html, body').animate({
      scrollTop: jQuery(".find-section").offset().top -50
      }, 500);
    });
});

screen87

Method 2

/*Window Load*/

	jQuery(window).on('load', function(){

	  setTimeout(function(){ 
	    var tab = window.location.search;
	    if(tab){
	      var tabs   = tab.replace('?', '');
	      var scroll = tabs.split('=');
	      console.log(scroll[1]);
	    	jQuery('html, body').animate({
	      		scrollTop: jQuery('#'+scroll[1]).offset().top -80
	      	}, 500);

	    }
	  }, 1500);


	});
	/*End Window Load*/

Leave a Reply

Your email address will not be published. Required fields are marked *