Here is the code: -
$(document).ready(function (){ $("#button").on('click',function(){ $('html, body').animate({ scrollTop: $("#dynamictabstrp").offset().top }, 1000); }); });
or
$(document).ready(function (){ $("#button").click(function(){ $('html, body').animate({ scrollTop: $("#dynamictabstrp").offset().top }, 1000); }); });
source share