How do I scroll to a specific div in HTML? 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);
});