1$("a[href='#top']").click(function() {
2 $("html, body").animate({ scrollTop: 0 }, "slow");
3 return false;
4});
1// this changes the scrolling behavior to "smooth"
2window.scrollTo({ top: 0, behavior: 'smooth' });
3
1 $("#scroll_icon").click(function()
2 {
3 jQuery('html,body').animate({scrollTop:0},2000);
4 })