visibility-class
v1.0.3
Published
Adds a visible/invisible class to chosen elements as you scroll.
Downloads
17
Readme
Visibility Class
Adds a visible/invisible class to chosen elements as you scroll.
Install
npm i visibility-class
Integrate
You're likely gonna wanna import and compile it, as it's written in ES6 (because life is short).
import visibilityClass from "visibility-class";
visibilityClass(".visibility-class");
<section class="visibility-class"></section>
That's all well and good, but what does it do?
As you scroll down, it'll add a class of visible
or invisible
to your chosen elements.
<section class="visibility-class visible"></section>