Skip to content

miaoT/js-backToTop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backToTop.js

back to top

A simple back to top button that can be used in any webpages.

Features

  • No dependencies
  • Scrolls to top quickly and smoothly when user clicks.

To use

It can load last after all web contents, therefore, add the below codes at the bottom of <body> section.

<script type="text/javascript" src="js/backToTop.js"></script>
<script type="text/javascript">

	var goTop = new goTop({
		container: "totop",
		hoverBgColor: "tabIcon"	
	});

Demo

Check it in CodePen

Note

The demo picture is a screenshot from a website I developed during my studies. A disclaimer is stated at the bottom of the website.

About

A simple back to top button that can be used in any webpages.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors