scroll top

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

Thumbnail
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 Codepen.io
Copyright kaktys ©
  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

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

<body>

  
  
  

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




</body>

</html>

/*Downloaded from https://www.codeseek.co/kaktys/scroll-top-BwrpZr */
  $('html, body').stop().animate({scrollTop:0}, 500, 'swing')

Comments