go up button code example Example: scroll to top $("#scroll_icon").click(function() { jQuery('html,body').animate({scrollTop:0},2000); })