Skip to content

lukasz-gorski/isInViewport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

isInViewport()

Small script to check element is on the viewport.

USAGE

Install package by npm

npm i @roghz/isinviewport

Install package by yarn

yarn add @roghz/isinviewport

Usage Example

import { isInViewport } from '@roghz/isinviewport';

const section = document.querySelectorAll('section');
section.forEach(item => {
    if (isInViewport(item)) {
        console.log(item);
    }
});

LICENSE

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published