jquery on click and scroll code example
Example 1: scroll to element jquery
$('html, body').animate({
scrollTop: $("#grepperRocks").offset().top
});
Example 2: how to add scroll to div onclick
$("button").click(function() {
$('html,body').animate({
scrollTop: $(".second").offset().top},
'slow');
});