Skip to content

A component that shows/hides an element when the user has scrolled a certain % of the page, and scrolls to the top of the page when clicked.

Notifications You must be signed in to change notification settings

nib-health-funds/back-to-top

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

back-to-top

A component that shows/hides an element when the user has scrolled a certain % of the page, and scrolls to the top of the page when clicked.

Example

var backToTop = require('back-to-top');
backToTop({
  element:        document.querySelector('.js-back-to-top'),
  hideClass:      'u-hidden',
  hideDistance:   0.25
});

About

A component that shows/hides an element when the user has scrolled a certain % of the page, and scrolls to the top of the page when clicked.

Resources

Stars

Watchers

Forks

Packages

No packages published