$(\u0027body html\u0027).animate( scrolltop 0 800)

 

 

 

 

.totop").click(function(event) var y (document).scrollTop() var down y600html, body).animate(scrollTop: down, 800) (html, body).animate( scrollTop: "0px" , 800) I suggest you do some research/reading before you ask trivial questions like these. Google can help you out before all of us can. (DebugContainer).stop().animate( scrollTop: (DebugContainer)[0].scrollHeight , 800) You can use the following codeYou can also, using jQuery, attach an animation to html,body of the document via