Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 402 Bytes

README.md

File metadata and controls

24 lines (16 loc) · 402 Bytes

Simple scrollTop

Hey, do you need a simple scrollTop method working like jquery's scrollTop() ? This is what you need. A crossbrowsing get and set scrollTop()

Usage

import scrolltop from 'simple-scrolltop';

// get
var currentPageScrollPosition = scrolltop();

// set
scrollTop(myNewScrollPosition);

Install

With npm do:

npm install simple-scrolltop