1.0.3 • Published 3 years ago

isitthere v1.0.3

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

IsItThere?

Simple function that takes in an element and returns how much of it is visible in the viewport along with information about the top and bottom being visible

import isItThere from "isitthere";

const elm = document.getElementById("iAmADOMElement");
const results = isItThere(elm);

console.log(results);
// {
//    topVisible: True,
//    bottomVisible: False,
//    percentVisible: 0.55,
// }
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago