0.0.2 • Published 1 year ago

element-scroll-position v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.0.1

1 year ago