I’m looking for a simple, cross-browser “scroll to top” animation I can apply to a link. I don’t want to require a JS library such as jQuery/Moo, etc.

// jQuery Equivilant to convert to pure JS...
$('html, body').animate({scrollTop:0}, 400);

I’m a perfect case for someone who should have learned JS 100% before jumping into a library. 🙁

21 Answers
21

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *