scroll to specific div using jquery code example
Example 1: jquery scroll to id
$('html, body').animate(
{
scrollTop: $($(this).attr('href')).offset().top,
},
500,
'linear'
)
Example 2: javascript go to div id
//slowScroll
function scroll() {
$('html, body').animate({
scrollTop: $("#divName").offset().top
}, 2000)};
window.onload = scroll;