if you want to scroll the window smoothly on click then you can make that using this code to reach the particular div.
jQuery(".addto_cart_button").click(function() {
jQuery('html, body').animate({
scrollTop: jQuery("#cust-id").offset().top
}, 2000);
});
If you have multiple link to scroll.. like links in Navbar menu then you can use this script..
This is best for One page website ..
jQuery(".menu-item-type-custom a").click(function() {
var idd = jQuery(this).attr('href').replace( "/", "" );
jQuery('html, body').animate({
scrollTop: jQuery(idd).offset().top
}, 1000);
});
If in your anchor tag menu have value without slash(/) <a href=”#about”>About</a> then use this..
var idd = jQuery(this).attr('href');
If have value with slash(/) <a href=”/#about”>About</a> then use this..
var idd = jQuery(this).attr('href').replace( "/", "" );