0.0.2 • Published 2 years ago

element-scroll-position v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Element Scroll Position

This is a simple script that allows you to save and restore the scroll position of an element.

Usage

import { scrollPosition } from 'element-scroll-position';

const element = document.querySelector('.element');
const scroll = scrollPosition(element);

// And then we get this object
{
    isTop: boolean;
    isBetween: boolean
    isBottom: boolean;
}
0.0.2

2 years ago

0.0.1

2 years ago