scroll top

In this example below you will see how to do a scroll top with some HTML / CSS and Javascript

This awesome code was written by kaktys, you can see more from this user in the personal repository.
You can find the original code on
Copyright kaktys ©
  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

  <meta charset="UTF-8">
  <title>scroll top</title>



    <script  src="js/index.js"></script>



/*Downloaded from */
  $('html, body').stop().animate({scrollTop:0}, 500, 'swing')