Q:

scroll to top jquery

window.scroll({
 top: 0, 
 left: 0, 
 behavior: 'smooth' 
});
4
$("a[href='#top']").click(function() {
  $("html, body").animate({ scrollTop: 0 }, "slow");
  return false;
});
1
window.scrollTo({top: 0, behavior: 'smooth'});

reference : https://stackoverflow.com/questions/15935318/smooth-scroll-to-top
0
window.scrollTo(x-coord, y-coord);
0
$('#DIV_ID').scrollTop(0);
0
	$("#scroll_icon").click(function()
	{
		jQuery('html,body').animate({scrollTop:0},2000);
	})
1
window.scrollTo({top: 0, behavior: 'smooth'});
0

New to Communities?

Join the community