js scroll on click by element code example
Example: scroll to specific div
$(window).scroll(function() {
$('html, body').animate({
scrollTop: $("#myDiv").offset().top
}, 2000);
});
$(window).scroll(function() {
$('html, body').animate({
scrollTop: $("#myDiv").offset().top
}, 2000);
});