Skip to content

A simple browser scroll management tool which can save and restore scroll value.

License

Notifications You must be signed in to change notification settings

sergei-zelinsky/scroll-saver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scroll-saver

A simple browser scroll management tool which can save and restore scroll value.

npm npm npm GitHub stars

Installation

npm i --save scroll-saver

or

yarn add scroll-saver

API

save()

Save window current scroll position.

restore()

Restore previously saved window scroll position.

Example

import ScrollSaver from 'scroll-saver';

// ...

const scrollSaver = new ScrollSaver();

// ...

scrollSaver.save();

// ...

scrollSaver.restore()

About

A simple browser scroll management tool which can save and restore scroll value.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published